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();
}
}
开发者_如何学JAVAThanks!
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)
)
)
);
精彩评论