Default Value for List Checkboxes

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

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.

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

By Codee - March 6, 2013

I don't know if it would work in this specific case (since I don't have all the details)...BUT...sometimes when I'm up against an issue like this I use 'reverse-programming-psychology'. So I would create a check field for when the element is NOT wanted, if that is the less-than-normal case. Then I add a where filter at the top of the page (if necessary) for the reverse statement instead. Basically, if every record is going to have those items by default, then make the checkbox be positive for 'not' having it by default. Sometimes it ends up easier, simpler, and cleaner code.