开发者

How to Echo a Single text line preceding a Zend Form?

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();
}
}
开发者_如何学JAVA

Thanks!


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)
                )
            )
        );
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜