Welcome Guest, Not a member yet? Register   Sign In
is there any better way to higlite the form fields via Codeigniter FORM_VALICATION class?
#8

[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?


Messages In This Thread
is there any better way to higlite the form fields via Codeigniter FORM_VALICATION class? - by El Forum - 12-11-2009, 01:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB