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)

By Davidpanter - February 1, 2021

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 Davidpanter - February 1, 2021

Hi Jenna,

thank you for your reply, essentially, my list is generated from another table using SQL depending on what feature it is, so i don't know how many options there are likely to be,

I.e

im creating a style for a jacket,

 create the style-code, and all the features of that jacket has, i.e colour, buttons, fabric etc...

 i have other tables for available options for colour , buttons , fabric... that i can choose from.

so every time i create a new garment, all the options are 'off' and i need to default them to 'ON' and then turn off the options i don't want

Please see attached,

these show what i am seeing when i create a new garment, and the other is the settings i have in the field options