Created
May 5, 2013 21:27
-
-
Save mehlah/5522243 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Generates a form field with a label, input, and error message (if applicable), all contained | |
* within a wrapping element. | |
*/ | |
public function field($name, array $options = array()) { | |
if ($this->_binding && $this->_binding->errors($name)) { | |
$options['wrap']['class'] = 'error'; | |
} | |
return parent::field($name, $options); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment