Submit button label gets wrong value when multiple gravity forms on page
-
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)
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.