• Resolved pmProbeg

    (@pmprobeg)


    I was just curious, what is the purpose of the JS function which finds all submit buttons and disables them? I found that it was this JS which was initially blocking me from setting up multiple forms on the same checkout page; however, now I’m curious how the original submit button was even working in the first place with this function in place.

    If anyone has any insight, I’d love to hear back!

    Thanks a lot!

    https://www.ads-software.com/extend/plugins/paid-memberships-pro/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter pmProbeg

    (@pmprobeg)

    PM PRO has a js function which disables the submit button so that the user does not submit to checkout twice. I should have done my research before posting,sorry. Hope this helps someone.

    Plugin Author Jason Coleman

    (@strangerstudios)

    Right, the idea is to keep people from submitting twice.

    Here is the JS found in /pages/checkout.php

    // Find ALL <form> tags on your page
    jQuery('form').submit(function(){
    	// On submit disable its submit button
    	jQuery('input[type=submit]', this).attr('disabled', 'disabled');
    	jQuery('input[type=image]', this).attr('disabled', 'disabled');
    });

    I believe this should only disable submit buttons within the same form as the submit button clicked. (Not other buttons on the site.)

    If needed I can create a hook to disable or tweak this functionality for you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Paid Memberships Pro] JavaScript function that disables all submit buttons in Checkout.php?’ is closed to new replies.