The code :
<?php echo $form->create('User');?>
<fieldset>
<legend><?php echo sprintf(__('Add %s', true), __('User', true));?
></legend>
<?php
echo $form->input('check', array('type' => 'checkbox',
'value' => 1));
echo $form->input('role_id');
echo $form->input('username');
...
will produce
<form id="UserAddForm" method="post" action="/cake12/tstacl/users/
add"><input type="hidden" name="_method" value="POST" /> <fieldset>
<legend>Add User</legend>
<div class="input"><input type="hidden" name="data[User][check]
[check]" value="0" id="UserCheck_" /><input type="checkbox"
name="data[User][check][check]" value="1" id="UserCheck" /><label
for="User">Check</label></div><div class="input"><label
for="UserRoleId">Role</label><select name="data[User][check][role_id]"
id="UserRoleId">
<option value="1">administrator</option>
<option value="9">Manager</option>
</select></div><div class="input"><label for="UserUsername">Username</
label><input name="data[User][check][username]" type="text"
maxlength="64" value="" id="UserUsername" /></div><div
class="input"><label for="UserPassword">Password</label><input
type="password" name="data[User][check][password]" value=""
id="UserPassword" /></div> </fieldset>
Have a look to the names of the fields, they all get "[check]"
inserted.
If I move the username field before the checkbox, the name will be
correct.
I have also set the field check to be hidden ( 'type' => 'hidden') and
this produce the same error.
It's correct if I have no field (other than "id") hidden
The last version working from the branch (for me) was 5950