Lists, default values set to 'ON' state rather than 'OFF'

4 posts by 2 authors in: Forums > CMS Builder
Last Post: March 1, 2021   (RSS)

Hi , this seems like a simple issue, but i cant find the answer in the forum:

i have created a list that uses checkboxes for multiple values, these option values are from another table, what do i need to put into the 'Default Value' in the field options to make everything be selected when i create and not deselected?

currently every time i create a new object, all the options have to be ticked, i just want to deselect the ones i don't want, hope this makes sense, photo attached

Attachments:

list.JPG 44K

By Jenna - February 1, 2021

Hi Davidpanter,

Do you have a lot of options to select from? In the "list" functionality, it's expecting default values to be separated by a tab character. I was able to go into my text editor (or I'm sure word processors would work too), and separate my options with a tab (\t) and have them automatically select all in newly created items in my section. See screenshots below.

Note that the options will be converted into an array to check against, character for character of the option value... so the default value options, only separated by a "tab", must match the values in your options list.

Please let me know if that helps.

Jenna Cooke - PHP Programmer
interactivetools.com

By Jenna - March 1, 2021

Hi Davidpanter,

We can't think of a way to do this without the use of a plugin. You could take a look at using the `record_preedit` hook to add the required options to the request on page load with a plugin, or alternately contact us at support@interactivetools.com and we can provide you with more information or help by building the plugin.

Feel free to send us an email and we'd be happy to help and provide you with more information on this option.

Jenna Cooke - PHP Programmer
interactivetools.com