Posts: 69
Threads: 22
Joined: Feb 2009
Reputation:
0
Hi Ben,
I've been messing around with the RSV form validation script and was wondering if it would be a good idea to be able to handle validation within your own script, say in the 'Fields' section of a form. You could simply add a checkbox next to each field to allow whether this field is required or not.
Just an idea, it would make it a lot easier and ideally, as you already know, validation is one of the most important functions in a form script.
Regards,
Tony
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
I've hemmed and hawed over something like this for ages. But really, I think that validation should be part of the form itself...
Perhaps a module that could auto-generate the RSV validation rules based on the fields? That seems a good approach. You could then copy & paste the JS into your form page to use it. Hmmm...!
Thanks for posting this!
Posts: 69
Threads: 22
Joined: Feb 2009
Reputation:
0
Hi Ben,
That sound good. It will complete your form having this validation script together with your FormTools script.
Regards,
Tony
Posts: 40
Threads: 7
Joined: Mar 2009
Reputation:
0
I second this! Sounds like a great idea... maybe a similar module for the php validation as well if feasible.
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Yeah, I was thinking of just combining them. When you construct the validation rules it would generate both. It's not terribly hard at all, just a bit time consuming. But yes, I'll work on this pretty soon I think.
- Ben
Posts: 69
Threads: 22
Joined: Feb 2009
Reputation:
0
Hi Ben,
That's excellent, it'll help a lot of people.
Regards,
Tony
Posts: 17
Threads: 5
Joined: Feb 2009
Reputation:
0
Just chiming in to second this as well, form validation was the one feature not found in FT but that you fond in all other form processor solutions. That and Captcha I think are 2 "must have" features of today. I agree it belongs to the form, still it must be a part of the form processing and as both a php and javascript solution has ben created standalone by Ben, integrating them with FT is just the natural next step to take.
This must be an excellent candidate for a (much needed) Module!
Posts: 69
Threads: 22
Joined: Feb 2009
Reputation:
0
Yes, I also second the 'Captcha' function too as it seems to stop spam emails bulging your mailbox. I'm in the middle of adding a Captcha feature in php to this form and having it on FormTools is a huge bonus, i.e. makes it easier.
Tony
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Hey guys,
Right now, the API does contain a <a href="http://docs.formtools.org/api/?page=ft_api_display_captcha">CAPTCHA function</a>, but there isn't an option for adding it to forms that are posted to process.php. I'll have to give that some more thought. Thanks for the feedback!
- Ben