Cakephp form input fields can be created via the form helper. First add this to the app_controller.php :
var $helpers = array(‘Form’);
Now you can create forms in view via the syntax :
<?php echo $form->input('input field name preferably the model tables field name',array of options); ?>
Eg. <?php echo $form->input('title',array('label'=>__('Title: ',true),'type'=>'text','class'=>'inplogin')); ?>
The ‘type’ in the options array can be text,textbox,file,select,radio etc. if select or radio is specified then the options array have to be specified which contains the values in key=>value format.
Eg. <?php echo $form->input('title',array('label'=>__('Title: ',true),'type'=>'select',’options’=>array(‘1’=>’kolkata’,’2’=>’delhi’,’3’=>’mumbai’),’empty’=>’Please Select’,’default’=>’2’,'class'=>'inplogin')); ?>
The empty and default field specifies what to show when no options are chosen and what to show by default respectively.
Every form field by default takes an id which is of the form of <camelcaseformname><camelcaseinputfieldname>.you can also specify your custom id by passing the ‘id’ in the form input options.
For more go to http://book.cakephp.org/view/189/Automagic-Form-Elements