Answer the question
In order to leave comments, you need to log in
Why is on_sent_ok in Contact Form 7 not seeing my function?
Site on Wordpress. There is a contact form made on Contact Form 7. In additional settings on_sent_ok: "myFunction();". myFunction() is a function in the included js I wrote. But in the end, after submitting the form, I get an error: Uncaught ReferenceError: myFunction is not defined
What could be the problem?
Answer the question
In order to leave comments, you need to log in
Unfortunately, the connection in the footer does not solve the problem.
I did it differently:
1. placed a hidden button with id = "hide_button"
2. in the form settings: on_send_ok: $( '#hide_button' ).click();
3. $('#hide_button').click(function () { ... }); - here is my code in my js.
But an extra element ... some kind of crutch)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question