Form Validation |
I'm not too happy with the form validation call back function, and it feels as if I'm working against it for some specific cases.
Let's say I have four $_POST fields... But I want to validate if it is valid by passing ALL four into a function and determining if it is good or not. Can I do this? At the moment each post field has a callback function. I would like so that you pass all four into one function, and then if failed repopulate the form. I can't think of a way around this so I am probably mis-using the flash data to achieve this. Any pointers most welcomed.
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com
(10-01-2015, 12:17 PM)iamthwee Wrote: I'm not too happy with the form validation call back function, and it feels as if I'm working against it for some specific cases. You can use array as field names: http://www.codeigniter.com/user_guide/li...ield-names Or this: http://www.codeigniter.com/user_guide/li...-than-post with callbacks work fine.
Thanks the set_data() looks like what I need if I can pass a callback function to it with all four variables.
Will investigate tomorrow.
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com
me too here, but using array for call bagk is the best way to minimize time to coding even never tested,
Thanks looks like I'll have to stick with using my hacked flash data method
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com
|
Welcome Guest, Not a member yet? Register Sign In |