#1 October 1, 2014 3:29pm

jmason03
Member
Registered: January 9, 2014
Posts: 123

Checkboxes in Templates/Modules with Multiple Options

Would it be possible to add an option that combines both the list and checkbox features that allows users to select multiple checkboxes from a defined list? These selections then get saved as one field that's comma (or whatever) delimited. In my particular case I'm setting up a module where users assign content to categories and they need to be able to choose more than one and at the moment there isn't a great way to implement that other than each category getting it's own checkbox resource and using a callback function.

Thanks

Offline

#2 October 2, 2014 3:09pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 974

Re: Checkboxes in Templates/Modules with Multiple Options

Just replied in your other thread, but I've put together a field type for you to install and check out. It emulates all the features (other than group based permissions) that a normal "List" field does but draws checkboxes so that you can do multiple selections.  The value is stored as JSON explicitly in the process file but BigTree will also just implicitly store arrays as a JSON object in the database if you did

$field["output"] = $field["input"];

on array data that was posted.

http://www.bigtreecms.org/files/field-t … kboxes.zip

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.