[eluser]Yoosuf Muhammad[/eluser]
[quote author="Whiplash" date="1260272676"]
Code:
function _apply_validation_tags(&$default)
{
if(form_error($default['name']))
{
if (isset($default['class'])) {
$class_terms = explode(' ', $default['class']);
$class_terms[] = 'validation_error';
$default['class'] = implode(' ', $class_terms);
}
else
{
$default['class'] = 'validation_error';
}
}
return $default;
}
It seems to work pretty well. Let me know what you think, I'm really new to PHP and Codeigniter so suggestions are welcome.
Dana[/quote]
how to use this helper function block?