• When there are multiple gravity forms on a page (especially before the form with the ajax upload field), the submit button label gets the wrong reset value when uploading is complete. A possible fix for this is by setting the initial value(s) at the bottom of the js file by form ID:

    
    // get form id
    var form_id = jQuery( 'input.itsg_ajax_upload_browse' ).closest( 'form' ).attr( 'id' );
    		
    // get the form navigation button text values
    window.itsg_gf_ajaxupload_next_value = jQuery( '#' + form_id + ' .gform_next_button' ).attr( 'value' );
    window.itsg_gf_ajaxupload_previous_value = jQuery( '#' + form_id + ' .gform_previous_button' ).attr( 'value' );
    window.itsg_gf_ajaxupload_submit_value = jQuery( '#' + form_id + ' .gform_button[type="submit"]' ).attr( 'value' );
    window.itsg_gf_ajaxupload_save_value = jQuery( '#' + form_id + ' a.gform_save_link:not(.top_button)' ).text();
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ovann86

    (@ovann86)

    Hey,

    Out of curiosity, do you know if Gravity Forms have official support for multiple forms on a single page? I’ve read all sorts of issues stemming from it, but they were probably old issues.

    I’ve had a go fixing up the JavaScript based on what you provided (thanks). I ended up making a few more changes so it works with the ‘review page’ feature as well (the “next” button is not “next” on one page when this is enabled).

    Would you mind checking if this version works for you?

    Replace itsg_gf_ajaxupload_js.js

    and open the page with ?gform_debug at the end of the url.

    E.g. https://demo.itsupportguides.com/ajax-upload-for-gravity-forms/single-page-form/?gform_debug

    new version: http://pastebin.com/B2ReBXRj

    Thread Starter Wietse Veenstra

    (@hideon)

    Hi,

    Thank you for the quick reaction. I tested the new code and now every submit button gets replaced by the one form the currently active form so the fix is not working as expected yet.

    According to the forum the plugin should support multiple forms on the same page without a problem.

    Plugin Author ovann86

    (@ovann86)

    Hey,

    I’m going release an update that will hopefully fix this up.

    When you can, can you update and let me know if it’s working as expected.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Submit button label gets wrong value when multiple gravity forms on page’ is closed to new replies.