The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Problems with Validation - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Problems with Validation (/showthread.php?tid=2705) |
Problems with Validation - xCav8r - Oct 3rd, 2013 I'm a new user to Form Tools and most likely suffering from user-error. I have utilized the Validation Tab (as seen, for example, here) to mark fields as required. It doesn't seem to have the desired effect. You can test my form here. Do I also need to modify the content of the rsv.js file for each of the fields I've marked as required? Any help or direction would be appreciated. (Edit) PS. I ran the various checks in the system check module and returned no errors. I'm using core version 2.2.6. RE: Problems with Validation - Joe - Oct 4th, 2013 Hi there, You need to define your validation rules (ex: indicate what fields are mandatory) in your form after you include rsv.js As an example for your form you would need: var rules = []; // this stores all the validation rules rules.push("required,Question1,Please enter your name."); rules.push("required,Question2,Please enter your company name."); rules.push("required,Question4,Please enter your email address."); rules.push("valid_email,Question4,Please enter a valid email address."); http://docs.formtools.org/tutorials/js_validation/index.php?page=rules Cheers, Joe |