PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Integrating jQuery Calculations into Gravity Forms Calculations

  1. Is it possible to integrate jQuery calculations into gravity forms calculations?
    example..
    http://designfitz.com/test-page/

    I have 3 Fields here in the simple example, you enter a number in the first field, jQuery then updates the value in the second field, and the third field is supposed to be populated by gravity forms, but not unless you tab through or click it does it update, is there any way to get gravity forms fields to recognise data entered by jQuery??

    Posted 11 years ago on Tuesday May 14, 2013 | Permalink
  2. Richard Vav
    Administrator

    You need to edit your script to trigger the gravity calculation, if you view the source of the page you will find two scripts immediately beneath your form, it is the second script that triggers the gravity calculation so you need to include that trigger in your jQuery function like so

    jQuery(function() {
        jQuery("#input_4_1").keyup(function () {
        var phone1 =jQuery(this).val();
        jQuery("#input_4_2").val(phone1);
        jQuery(document).trigger('gform_post_render', [4, 1])
        }).keyup();
    });

    Regards,
    Richard

    Posted 11 years ago on Tuesday May 14, 2013 | Permalink
  3. Amazing! thank you so much! your a life saver. :)

    Posted 11 years ago on Tuesday May 14, 2013 | Permalink
  4. Richard Vav
    Administrator

    You're welcome

    Posted 11 years ago on Tuesday May 14, 2013 | Permalink
  5. David Peralty

    Yes, thanks again richard. :)

    Posted 11 years ago on Tuesday May 14, 2013 | Permalink

This topic has been resolved and has been closed to new replies.