Form Errors |
[eluser]dippy[/eluser]
is there a simple way to use an error icon next to the input field that has the error but then show the error message somewhere else? say at the top of the page? right now i am using the validation class. Code: $this->validation->set_message('check_service', 'Please select a service'); and then using this to print the message Code: $this->validation->serviceType_error; Thanks in advance
[eluser]bretticus[/eluser]
[quote author="dippy" date="1252461982"]is there a simple way to use an error icon next to the input field that has the error but then show the error message somewhere else? say at the top of the page?[/quote] Yes, checkout the manual about showing individual errors. To do the icon, just change your error delimiters. Use a variant of validation_errors() to show your errors at the top. Code: <?php echo validation_errors('<div class="error">', '</div>'); ?>
[eluser]dippy[/eluser]
[quote author="bretticus" date="1252468876"][quote author="dippy" date="1252461982"]is there a simple way to use an error icon next to the input field that has the error but then show the error message somewhere else? say at the top of the page?[/quote] Yes, checkout the manual about showing individual errors. To do the icon, just change your error delimiters. Use a variant of validation_errors() to show your errors at the top. Code: <?php echo validation_errors('<div class="error">', '</div>'); ?> Awesome thanks for your help.
[eluser]dippy[/eluser]
i cannot get the text to stop coming up over the icon... i have the error printing at the top of the page and i am trying to have an "x" icon show up next to the form field the user forgot. here is the code for just the form. my files are pretty big to put it all up... controller: Code: if($service != 'none'){ view: Code: <? echo validation_errors();?> i have the error text "Please select a service" showing up at the top AND over top of the errorIcon div. is there a way to just show the icon and no text? thanks in advance. |
Welcome Guest, Not a member yet? Register Sign In |