Contents tagged with "FontAwesome"

  • Disable Submit Button on Form Submit

    When a form is being submitted, sometimes, as the users are waiting, they might click more than once the submit button. This may cause duplicates submissions. 

    First, we will disable the submit button when the form is valid.

    $('form').submit(function () {    if ($(this).valid()) {        $(this).find('button[type="submit"]').prop('disabled', true);    }});

    We can make it more beautiful if we add a loader as the user is waiting. For the loader in this example, I used FontAwesome Fonts. 

    $(' …

    Read More