Welcome Guest, Not a member yet? Register   Sign In
Advanced Form Validation question
#1

[eluser]The Revel[/eluser]
Is there a way to set up form validation based on whats filled out in the form, for instance if a certain field has a certain value, it checks another field for a certain value.

What I am trying to set up is that if the type of transaction is set to Refund that the manager has to put in their code in another field for it to pass. All other types of transaction will ignore the second field, its only required on refunds.
#2

[eluser]Aken[/eluser]
Options:

- Create a callback rule.
- Extend the library with a custom rule (good if using it in multiple places).
- Check for the existence of the Refund item, and set the required rule if it exists.
#3

[eluser]The Revel[/eluser]
Thank you Aken, I read about the Call back functions in the form validation documentation, will see fi I can come up with something. Unfortunately I am still coding my first codeigniter app and am still very new to the whole thing so I know I am gonna be back asking questions LOL.




Theme © iAndrew 2016 - Forum software by © MyBB