Need help turning multi value checkbox list into an array

3 posts by 2 authors in: Forums > CMS Builder
Last Post: June 15, 2012   (RSS)

Re: [ScottL] Need help turning multi value checkbox list into an array

By Jason - June 15, 2012

Hi,

getRecords will provide you an array of all the selected values that you can access using the :values pseudo field.

EXAMPLE:
<?php foreach ($record['select_color:values'] as $color): ?>
<input type = "radio" name = "select_color" value = "<?php echo $color;?>" /><?php echo $color;?><br/>
<?php endforeach ?>


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Need help turning multi value checkbox list into an array

By ScottL - June 15, 2012

Works perfect. Thanks.