Cakephp forms are 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->create('formname preferably modelname in camelcase',array of options); ?>
Eg. <?php echo $form->create('AddContent',array('url'=>'/admin/contents/add')); ?>
The form is closed via the syntax : <?php echo $form->end(); ?>
The form fields are placed inside the form create and form end.
Some of the common options which are passed in the options in form are:
1. Array(‘controller’=>’cities’,’action’=>’add’) which specifies which action to call on form submit in this case it will call /cities/add
2. Array(‘url’=>’http://www.google.com’) or array(‘url’=>’/cities/add’) which specifies any external or internal url which should be called on form action.
3. Array(‘enctype’=>’ multipart/form-data’) specified when the form is about to submit some uploads like images and documents.
Apart from these you can specify all normal form attributes in array structure.eg.
<?php echo $form->create('AddContent',array('url'=>'/admin/contents/add',’id’=>’myform’, callme();’)); ?>
For more details go to http://book.cakephp.org/view/183/Creating-Forms