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.

Replace AJAX spinner with modal dialog

  1. frey1esm
    Member

    I'd like to use a full screen modal "please wait" indicator in lieu of the spinner when clicking "next" on a multi page form.

    Can this be done without hacking?

    Thanks.

    Posted 13 years ago on Sunday April 24, 2011 | Permalink
  2. There's currently no option to replace the Ajax spinner message with a dialog. If you wanted to do that, it would require some customization.

    Posted 13 years ago on Sunday April 24, 2011 | Permalink
  3. frey1esm
    Member

    Is there an event, similar to gform_page_loaded, that fires immediately after the "next" button is clicked but before the next page is loaded?

    Posted 13 years ago on Monday April 25, 2011 | Permalink
  4. No, there isn't an even that fires on the button click. However, the spinner is getting displayed during the form submit event. If you can use the same event and manage to subscribe it in a way that it fires after Gravity Forms has added the spinner, you could change the spinner to whatever you want with jQuery. Following is the code that subscribes to the form submit event and displays the spinner.

    jQuery('#gform_{$form_id}').submit(function(){
    	....
    	jQuery('#gform_wrapper_{$form_id} .gform_next_button').attr('disabled', 'disabled').after('<' + 'img id="gform_ajax_spinner_{$form_id}"  class="gform_ajax_spinner" src="{$spinner_url}" alt="" />');
    });

    I hope this helps

    Posted 13 years ago on Monday April 25, 2011 | Permalink