Default Value for List Checkboxes

5 posts by 4 authors in: Forums > CMS Builder
Last Post: March 6, 2013   (RSS)

By clowden - February 6, 2013

I have a list that I am creating through the "Get options from database" (screenshot attached).

I would like all of the options, 4 of them, to all be checked by default. If I just type in a record number it will select only that one, makes sense, but could notĀ figureĀ out how to select them all. I tried "1,2,3,4" and other combinations like that but nothing worked.

By gkornbluth - February 6, 2013

Hi Clowden,

I assume you mean when a record is created in the CMSB back end and not in a viewer.

I think you'll have to use get options from MySQL Query.

I'm not sure how to set up the code.

Sorry I can't be of more help.

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By clowden - February 6, 2013

Correct. I want all of my list options to be checked by default when myself or another users creates a new record.

Just wanted to attach that screen to show how the list was generated and the default options I was talking about.

Thank you.

By gregThomas - February 13, 2013

Hi,

There isn't a way to do this by default in CMS Builder, but you could create a plugin to do it. You would need to use the plugin hook record_preedit to edit the contents of the request array when an article was created.

We could create this plugin for you if needed. If you send an e-mail to consulting@interactivetools.com, we can give you an estimate of the cost.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com