Question

I have a Zend_Form that is being called by the indexAction of my controller. It's a login form for a certain user type. How do I create a hyperlink to the other login forms in other controllers in my IndexController. For example, the IndexController should display Employee Login (not an employee, employers login here) where here is hyperlinked to the employer indexcontroller. Here's the content of my home page or indexcontroller:

class IndexController extends Zend_Controller_Action
{
public $form;


public function indexAction()
{

    $form = new LoginForm();

    $form->renderForm();
}
}

Thanks!

Was it helpful?

Solution

Try to do following. Add link to form description

$form->setDescription('<a href="path">Go</a>');

change form decorator

 $form->setDecorators(
            array(
                'FormElements',
                array(
                    'Fieldset',
                    array(
                        'legend' => 'Login'
                    )
                ),
                'Form',
                 array(
                    'Description', 
                    array('escape' => false, 'tag' => false)
                )
            )
        );
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top