Custom form view

For programming and general questions on Zend Framework

Custom form view

Postby gaurangrajvir on Tue Dec 18, 2012 6:03 am

Hello

I am doing like below to display form element and related error message.

$formLabel = $this->plugin('formLabel');
$name = $form->get('artist');
echo $formLabel->openTag() . $name->getOption('label');
echo $this->formInput($name);
echo $this->formElementErrors()
->setMessageOpenFormat('<div class="help-inline" style="color:red;">')
->setMessageSeparatorString('</div><div class="help-inline">')
->setMessageCloseString('</div>')
->render($name);

I can change Style to display error message like below

echo $this->formElementErrors()
->setMessageOpenFormat('<div class="help-inline" style="color:red;">')
->setMessageSeparatorString('</div><div class="help-inline">')
->setMessageCloseString('</div>')
->render($name);

But I want to change Error message html through out the project. How can I do that ?


Thanks in advance.
Gaurang
gaurangrajvir
 
Posts: 4
Joined: Tue Dec 18, 2012 6:01 am

Return to Zend Framework

Who is online

Users browsing this forum: aaro9893 and 8 guests