Home N-13 News Forums Help Search
RegisterForgot password?
Login with facebook , twitter and google account aningbo
I have the following error at the top of the page how to fix it Rayc

Latest N-13 News 4.0.2

What is N-13 News?
Where can I get help?

Forums Tutorials Creating checkbox arrays with CakePHP
Chris
Posted on 23 Dec 2011, 04:03:34

Access: Admin
Total Posts: 1349
Joined: 2006-05-19

Useful tip for creating checkbox arrays using the form helper similar to

<input name="test[]" type="checkbox" />

If you add a dot to the end of the name when creating the checkbox, the formhelper will automatically turn it into an array, so the following

echo $this->Form->input("test.", array("type" => "checkbox"));

Will output

<input name="Model.test[]" type="checkbox" />
#3647
Last edited by Chris at 2011-12-23 04:08:30 Reason: .
Network-13.com © 2011