Multicheckbox

I want to accomplish this:

<form> <input type="checkbox" name="theCheckbox" value="1"/> Value one <input type="checkbox" name="theCheckbox" value="2"/> Value two <input type="checkbox" name="theCheckbox" value="3"/> value three </form>

and this is how I'm trying>

Controller: $tagsDataset= Tags::find(); foreach ($tagsDataset as $tag) $categoryTags[$tag->tagid]=$tag->nameen;

$cbxCategoryTags=new Check('category_tags',$categoryTags);

$form->add($cbxCategoryTags;

View.phtml

$form->render('category_tags');

And it is only outputting the first element of the array.



34.7k

Hi theCheckbox replace to theCheckbox[]