How can I bind js event on Gravity Froms submission?
up vote
0
down vote
favorite
I'm trying to bind js event on Gravity Forms submission. I've enabled ajax for that form, I tried solutions described on official Gravity Forms support forum and example from here but they didn't work for me, also I've read documentation on GF official site, but it didn't clear the situation for me. I wonder where problem is, my site is on WordPress v.4.7.11 with jQuery v.1.12.4. Here is code I've placed as html element in my form:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery(document).bind('gform_confirmation_loaded', function(event,
form_id){
if(form_id == 132){
console.log("success");
}
});
});
</script>
P.S. Here is the code that works, but it works after form is rendered:
<script type="text/javascript">
jQuery(document).on('gform_post_render', function(){
console.log("success");
});
</script>
Any help and tips would be appreciated, thanks.
javascript jquery wordpress gravity-forms-plugin
add a comment |
up vote
0
down vote
favorite
I'm trying to bind js event on Gravity Forms submission. I've enabled ajax for that form, I tried solutions described on official Gravity Forms support forum and example from here but they didn't work for me, also I've read documentation on GF official site, but it didn't clear the situation for me. I wonder where problem is, my site is on WordPress v.4.7.11 with jQuery v.1.12.4. Here is code I've placed as html element in my form:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery(document).bind('gform_confirmation_loaded', function(event,
form_id){
if(form_id == 132){
console.log("success");
}
});
});
</script>
P.S. Here is the code that works, but it works after form is rendered:
<script type="text/javascript">
jQuery(document).on('gform_post_render', function(){
console.log("success");
});
</script>
Any help and tips would be appreciated, thanks.
javascript jquery wordpress gravity-forms-plugin
Try changing to.on
instead of.bind
– Kamran Syed
Nov 8 at 13:59
Thank you, but I've tried it already, didn't help.
– Антон Портнянко
Nov 8 at 14:33
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to bind js event on Gravity Forms submission. I've enabled ajax for that form, I tried solutions described on official Gravity Forms support forum and example from here but they didn't work for me, also I've read documentation on GF official site, but it didn't clear the situation for me. I wonder where problem is, my site is on WordPress v.4.7.11 with jQuery v.1.12.4. Here is code I've placed as html element in my form:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery(document).bind('gform_confirmation_loaded', function(event,
form_id){
if(form_id == 132){
console.log("success");
}
});
});
</script>
P.S. Here is the code that works, but it works after form is rendered:
<script type="text/javascript">
jQuery(document).on('gform_post_render', function(){
console.log("success");
});
</script>
Any help and tips would be appreciated, thanks.
javascript jquery wordpress gravity-forms-plugin
I'm trying to bind js event on Gravity Forms submission. I've enabled ajax for that form, I tried solutions described on official Gravity Forms support forum and example from here but they didn't work for me, also I've read documentation on GF official site, but it didn't clear the situation for me. I wonder where problem is, my site is on WordPress v.4.7.11 with jQuery v.1.12.4. Here is code I've placed as html element in my form:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery(document).bind('gform_confirmation_loaded', function(event,
form_id){
if(form_id == 132){
console.log("success");
}
});
});
</script>
P.S. Here is the code that works, but it works after form is rendered:
<script type="text/javascript">
jQuery(document).on('gform_post_render', function(){
console.log("success");
});
</script>
Any help and tips would be appreciated, thanks.
javascript jquery wordpress gravity-forms-plugin
javascript jquery wordpress gravity-forms-plugin
asked Nov 8 at 13:30
Антон Портнянко
389
389
Try changing to.on
instead of.bind
– Kamran Syed
Nov 8 at 13:59
Thank you, but I've tried it already, didn't help.
– Антон Портнянко
Nov 8 at 14:33
add a comment |
Try changing to.on
instead of.bind
– Kamran Syed
Nov 8 at 13:59
Thank you, but I've tried it already, didn't help.
– Антон Портнянко
Nov 8 at 14:33
Try changing to
.on
instead of .bind
– Kamran Syed
Nov 8 at 13:59
Try changing to
.on
instead of .bind
– Kamran Syed
Nov 8 at 13:59
Thank you, but I've tried it already, didn't help.
– Антон Портнянко
Nov 8 at 14:33
Thank you, but I've tried it already, didn't help.
– Антон Портнянко
Nov 8 at 14:33
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53208765%2fhow-can-i-bind-js-event-on-gravity-froms-submission%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Try changing to
.on
instead of.bind
– Kamran Syed
Nov 8 at 13:59
Thank you, but I've tried it already, didn't help.
– Антон Портнянко
Nov 8 at 14:33