Add progress bar to page 2 'next' button

Discussion in 'Customization & add-ons' started by bmedwards, Apr 29, 2015.

  1. bmedwards

    bmedwards New Member

    Jun 27, 2014

    What is the best practice to add code to the submitHandler in an aMember signup form?

    I wish to add a progress bar to the second page form, so that when a user clicks the 'next' button, a progress bar will popup and display a progress bar animation until the page processes and finishes. I have some code that runs onInsertAfterUpdate that takes about 15 seconds, and I wish to disable the next button, and have a popup progress bar.

    I assume that I will be adding the code to the jQuery submitHandler to process after the form validation is completed. Do I add this to site.js? What would be the correct way to do this?

    I wish to add something like this:
    submitHandler:function(form){if($("form").valid()){ $('#progressBar').show(); form.submit();}}

  2. alexander

    alexander Administrator Staff Member

    Jan 8, 2003
    Yes sure this way is correct. You have to place your javascript code into /amember/application/configs/site.js

Share This Page