7.3.3.1 Field naming convention
The Form helper is pretty smart. Whenever you specify a field name with the form helper methods, it'll automatically use the current model name to build an input with a format like the following:
<input type="text" id="ModelnameFieldname" name="data[Modelname][fieldname]">
<input type="text" id="ModelnameFieldname" name="data[Modelname][fieldname]">
You can manually specify the model name by passing in Modelname.fieldname as the first parameter.
echo $form->input('Modelname.fieldname'); echo $form->input('Modelname.fieldname');
If you need to specify multiple fields using the same field name, thus creating an array that can be saved in one shot with saveAll(), use the following convention:
<?php
echo $form->input('Modelname.0.fieldname');
echo $form->input('Modelname.1.fieldname');
?>
<input type="text" id="Modelname0Fieldname" name="data[Modelname][0][fieldname]">
<input type="text" id="Modelname1Fieldname" name="data[Modelname][1][fieldname]">
<?phpecho $form->input('Modelname.0.fieldname');echo $form->input('Modelname.1.fieldname');?><input type="text" id="Modelname0Fieldname" name="data[Modelname][0][fieldname]"><input type="text" id="Modelname1Fieldname" name="data[Modelname][1][fieldname]">


























