$article_form = Fieldset::factory('article'); $title_field = $article_form->add('article_title'); $data['form'] = $article_form; $this-response->body = View::factory('welcome/index', $data);And in the view:
echo $form;
<div class="text email required"> <label for="contact-email">Email <abbr title="Required">*</abbr></label> <?php echo Form::input('email', $validation->input('email'), array( 'type' => 'email', 'id' => 'contact-email', 'required' => 'required' )); ?> <?php echo $validation->errors('email'); ?> </div>
$data['form'] = $article_form->build();Second question :
$form->add('fieldname', 'label', array('type' => 'textarea')); $form->add('fieldname1', 'label1', array('type' => 'password')); ...
It looks like you're new here. If you want to get involved, click one of these buttons!