re: Checkbox Groups in External Form?

Permalink
Hi guys,

Just wondering if this is at all possible? I have been using the form helper to output a checkbox group but I can not change the id's.

Below is the code I have been using:
$products = array('Standard Bubble','Lamination', 'Protective Bags', 'Insulation', 'Enviro Range', 'Special');
         for ($n = 0; $n < count($products); $n++) {
            print '<dd>'.$form->checkbox('product[]', $products[$n], false, array('id' => 'selected' . $n)).'<label for="chkbx'.$n.'">'.$products[$n].'</dd>';
         }


Any advice would be greatly appreciated.

cheers,
Ritch

 
olsgreen replied on at Permalink Reply
olsgreen
Hi,

The C5 form helper outputs the same ID as name so you can't override it.

You could however modify the helper and disable this.

Oliver

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.