The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Field validation within formtools - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: Feature Suggestions (https://forums.formtools.org/forumdisplay.php?fid=7) +--- Thread: Field validation within formtools (/showthread.php?tid=26) |
Field validation within formtools - antonitus - Mar 3rd, 2009 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 RE: Field validation within formtools - Ben - Mar 3rd, 2009 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! RE: Field validation within formtools - antonitus - Mar 3rd, 2009 Hi Ben, That sound good. It will complete your form having this validation script together with your FormTools script. Regards, Tony RE: Field validation within formtools - moorezilla - Mar 6th, 2009 I second this! Sounds like a great idea... maybe a similar module for the php validation as well if feasible. RE: Field validation within formtools - Ben - Mar 6th, 2009 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 RE: Field validation within formtools - antonitus - Mar 6th, 2009 Hi Ben, That's excellent, it'll help a lot of people. Regards, Tony RE: Field validation within formtools - yettyn - Mar 7th, 2009 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! RE: Field validation within formtools - antonitus - Mar 7th, 2009 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 RE: Field validation within formtools - Ben - Mar 7th, 2009 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 |