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 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

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

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