Question :
I do not want to use the additional setting because its filled with a bunch of analytics code. I want to my javascript function to fire when the button is clicked. example the contact form 7's button ID is #aft_submit.
Soution code for : Redirect contact form 7 with javascript
Seen as you are using jquery anyway, you can add the click on the submit button like this
You'll need to prevent the default 'submit' action
I do not want to use the additional setting because its filled with a bunch of analytics code. I want to my javascript function to fire when the button is clicked. example the contact form 7's button ID is #aft_submit.
![]() |
Redirect contact form 7 with javascript |
Seen as you are using jquery anyway, you can add the click on the submit button like this
1 2 3 4 5 6 | jQuery( document ).ready( function () { jQuery( "#aft_submit" ).on( 'click' , function (e){ e.preventDefault(); }); } |
No comments:
Post a Comment