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.

All scripts seem to be present but AJAX submission not working

  1. see https://s140452.gridserver.com/contact/ for reference

    I'm running 1.6.3.1.2

    I have the following scripts loading in the header:

    <script type='text/javascript' src='https://s140452.gridserver.com/wp-includes/js/jquery/jquery.js?ver=1.7.1'></script>
    <script type='text/javascript' src='https://s140452.gridserver.com/wp-content/plugins/gravityforms/js/jquery.json-1.3.js?ver=1.6.3.1.2'></script>
    <script type='text/javascript' src='https://s140452.gridserver.com/wp-content/plugins/gravityforms/js/gravityforms.js?ver=1.6.3.1.2'></script>

    plus

    <iframe style='display:none;width:0px; height:0px;' src='about:blank' name='gform_ajax_frame_1' id='gform_ajax_frame_1'></iframe>
                    <script type='text/javascript'>function gformInitSpinner_1(){jQuery('#gform_1').submit({eventName : 'ajaxSpinner'}, function(){jQuery('#gform_submit_button_1').attr('disabled', true).after('<' + 'img id="gform_ajax_spinner_1"  class="gform_ajax_spinner" src="https://s140452.gridserver.com/wp-content/plugins/gravityforms/images/spinner.gif" alt="" />');jQuery('#gform_wrapper_1 .gform_previous_button').attr('disabled', true); jQuery('#gform_wrapper_1 .gform_next_button').attr('disabled', true).after('<' + 'img id="gform_ajax_spinner_1"  class="gform_ajax_spinner" src="https://s140452.gridserver.com/wp-content/plugins/gravityforms/images/spinner.gif" alt="" />');});}jQuery(document).ready(function($){gformInitSpinner_1();jQuery('#gform_ajax_frame_1').load( function(){var contents = jQuery(this).contents().find('*').html();var is_postback = contents.indexOf('GF_AJAX_POSTBACK') >= 0;if(!is_postback){return;}var form_content = jQuery(this).contents().find('#gform_wrapper_1');var is_redirect = contents.indexOf('gformRedirect(){') >= 0;jQuery('#gform_submit_button_1').removeAttr('disabled');if(form_content.length > 0){jQuery('#gform_wrapper_1').html(form_content.html());jQuery(document).scrollTop(jQuery('#gform_wrapper_1').offset().top);if(window['gformInitDatepicker']) {gformInitDatepicker();}if(window['gformInitPriceFields']) {gformInitPriceFields();}var current_page = jQuery('#gform_source_page_number_1').val();gformInitSpinner_1();jQuery(document).trigger('gform_page_loaded', [1, current_page]);}else if(!is_redirect){var confirmation_content = jQuery(this).contents().find('#gforms_confirmation_message').html();if(!confirmation_content){confirmation_content = contents;}setTimeout(function(){jQuery('#gform_wrapper_1').replaceWith('<' + 'div id=\'gforms_confirmation_message\' class=\'gform_confirmation_message_1\'' + '>' + confirmation_content + '<' + '/div' + '>');jQuery(document).scrollTop(jQuery('#gforms_confirmation_message').offset().top);jQuery(document).trigger('gform_confirmation_loaded', [1]);}, 50);}else{jQuery('#gform_1').append(contents);if(window['gformRedirect']) gformRedirect();}jQuery(document).trigger('gform_post_render', [1, current_page]);});});</script><script type='text/javascript'> jQuery(document).ready(function(){jQuery(document).trigger('gform_post_render', [1, 1])}); </script>

    But the AJAX submission and error handling is not working. I have <?php wp_head(); ?> in the header and <?php wp_footer(); ?> in the footer. What's going wrong here?

    Thanks for your help!

    Posted 12 years ago on Tuesday March 6, 2012 | Permalink
  2. Hi, jsros86,

    There is a newer version of Gravity Forms (v. 1.6.3.2.1). Install that version and see if it makes a difference; there were some fixes around AJAX.

    Once you do that, let me know if you are still having problems and we will take a deeper look at your issue.

    Thanks.

    Posted 12 years ago on Wednesday March 14, 2012 | Permalink

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