Hi all,
I have an HABTM relation beetween Users table and Categories table: I
have a joint table utenti_has_category and I have set well the
relation in my User model.

In my view I display well with

echo $form->input('Categories', array('options' => $categories,
'multiple' => 'checkbox'));

a correct list of check box and in my controller I can save the
checked value.

It's all ok but I have little problem: the helper

My problem is that the tag display a vertical list of check box, with
div and label and broke my layout.

In my form rendering I'd like to put the list of checkbox categories
in 2 column of table, I prepared the loop for create the two colun but
I don't know in wich way I can separate the long list generated from
echo $form->input('Categories', array('options' => $categories,
'multiple' => 'checkbox'));
to generate a single checkbox.

I' tried this solution:

1) use $form->checkbox and pass the key and value of array in a
foreach: this solution create problem beacuse print hidde fields and I
can't save my data

2) put by hand <input type="checkbox".... but if my validation form is
wrong, when I return to myform my checked checkbox are not checked, I
think I must implement a little code to check by hand ....

Can someone help me?

For now I think :
1) to reimplement a checkbox helper for multiple
2) print all check box in list, with javascript remove all by id, and
re-put in my table this element... it's horrible solution but I think
that is the simplest.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to