PRE-CHECKING ALL ENTRIES MARKED AS ‘DEFAULT’ IN A MULTI VALUE CHECK BOX LIST - Dec 11th, 2015


With a lot of help from Ross Fairbairn, Interactive Tools’ consulting Guru, we came up with this method, based on the
following assumptions.

1. You have a multi-record section with one text field for each check box entry. For this example I’ve called the
section “entries”. It has at least one text field. For this example the text field is called “list_entry”.

2. You have a another multi-record section with a multi-value check box list field. For this example I’ve called the
section “listings” and the list field “my_list”.

3) the “my_list” field gets it’s options and values from the “entries” section using the
Get Options From Database (advanced) method, with:
Section Table Name > entries
Option Values > num
Option Labels > list_entry

The first step is to go to your "entries" section and make note of the records numbers for the list_entry records you
want to set as default in the multi-value"my_list” check box field when you create a new “listings” section
record.

Let's say you pick list_entry 1, 7 and 16.

The second step is to go to section editors under the admin menu and modify the “listings” Section Editor.

Choose the “my_list” field and enter the record numbers you chose (1,7, and 16) into the "Default Values" field,
separated by tab characters.

The only method that worked for me was to open my notepad text editor, entering a tab character in a blank text document
by pressing the tab key on my keyboard, then highlighting and copying (CTL-C) the tab character to my clipboard. I could
then paste (CTL-V) that character after entering each record number.

The result was:

1(tab)7(tab)16(tab)
NOTE:(you won’t actually see the (tab), but there should be a multi-character long space between the record numbers.

Save this field and the section details.

When you create a new record in the “Listings” editor, the “my_list” entries that you entered as defaults will
be pre-checked. (You can still uncheck those entries and/or check other entries in the list as required.)

Note that this will only affect new records, it will not change existing records.



The materials on this web site have been created for use with CMS Builder content management software. CMS Builder software is published and licensed for use by InteractiveTools.com. Please contact Interactive Tools for information on the downloading of the software or the purchasing of licenses.


Terms of Service