|
|||
|
I am having two problems with Zend Form and Zend Decorators that are driving me crazy.
I am trying to get this html structure when I get a form error: <li class="error"> <label class="desc" for="name"> First Name </label> <div> <input class="field text half" name="name" type="text" value="" /> </div> <p class="hint"> Your nickname </p> <p class="error"> Error Message </p></li>
if( $form->isValid($formData) ) { ...} else { $this->view->message = 'Validation Failed.';} Thanks so much for any help, Daniel |
|
|||
|
You must override your isValid function and manipulate the decorators there, basically you need to manipulate the HtmlTag decorator of the item with error and setOption('class', 'error')
sample: PHP Code:
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|