Integrating Contact Form 7 with a web service and editng validation_error messag
-
I am trying to reconfigure a Contact Form 7 form and I’m having 2 majors barriers. Let me explain the scenario. I am creating a registration form that when submitted will call a web service. That web service will handle the data validation and error messages, including checking to see if the user already exits based on email. The 2 major barriers are:
- I need to invalidate the form when I call the hook
wpcf7_before_send_mail
but I don’t see any examples of how to, or if it is even possible. Since the web service does all the validation I can’t use the typical validation hooks likewpcf7_validate_text*
because not all the form fields are text fields and I need to be able to send all the data at once to the web service to either register the user or return an invalid error message. - How can I change the validation_error message that appears at the bottom of the form (or where ever you put the
[response]
shortcode), rather than the field by field error called “reason?” I need one global error message that I can replace with the response from the web service rather than field by field errors.
- I need to invalidate the form when I call the hook
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Integrating Contact Form 7 with a web service and editng validation_error messag’ is closed to new replies.