On again, off again... I have messed around with gform_validation and that doesn't seem to be what I want either... Basically I want to validate an email against an internal scrub list and if the email is there then I want to block the form submit and display a message to the user letting them know I need a different email address. I can easily grab the field and do the check using gform_pre_submission, but I am not sure of exactly how to do that if it is right at all with gform_validation.
So in gform_pre_submission I just do the following:
$email = $_POST["input_7"];
and I have the email address to lookup against the scrub list. I basically tried just wiping $_POST["input-7"] but it still goes through. I am guessing that is based upon the sequence that the hooks are called (pre_submission is after validation maybe...).
Anyway, this seems like it would be a fairly common problem where people would want to validate some piece of information and stop the form submission so I am assuming that as usual I am making this harder than it needs to be.
Has anyone else tried anything remotely similar in the past? Any help would be greatly appreciated.
Posted 14 years ago on Thursday October 28, 2010 |
Permalink