How to render forms in social engine

For rendering forms in social engine first you need to create a form. After creating form define it into controller and after that on tpl file render it.

Please check the following example for more info:

In this example I am using Blog module create form and Index controller create action.

Controller file example:

public function createAction()
  {

    // Create form
    $this->view->form = $form = new Blog_Form_Create();

 }

Blog_Form_Create()  Means I have create form file exist inside Blog module folder -> Form folder

TPL file example for render the form:

<?php echo $this->form->render($this);?>


Blog Form

Post a comment

0 Comments