Trigger jquery when 'Gravity Forms' input button is clicked Trigger jquery when 'Gravity Forms' input button is clicked wordpress wordpress

Trigger jquery when 'Gravity Forms' input button is clicked


Are you trying to have something run upon form submission? If you're using the AJAX submission method of the form you can use the gform_confirmation_loaded event to run some JavaScript after the form is submitted.

$(document).on('gform_confirmation_loaded', function(e, form_id){   if(form_id == 2) {       $contactSlide.stop().css("top","0");   }});

It will run on every form submission so to specify the form, test the form_id parameter passed to the event handler.


You can control it from the form submit if you have a form..

<script type="text/javascript" src="js/jquery1.6.1.js"></script><script type="text/javascript"> $(document).ready(function () {   $("#forma").submit(function(event) {       //do what ever you need to here        return false;    });});</script><form name="1stform" method="post" action="/">    <input type="text" name="misc" id="misc" />    <input type="submit" name="submit" id="submit" value="submit 1st form"/></form>


$contactInput.focus(function () {    $contactSlide.stop().css("top","0");    $('body,html').animate({        scrollTop: 0    }, 0);    return true;});

Give it a try :)