본문 바로가기
IT-개발,DB

How to disable "Submit" button and multiple submissions?

by SB리치퍼슨 2019. 5. 25.

Having problems with a ticket being submitted multiple times?

This article will show you how to disable the Submit button after it has been click and change the text label to Submitting, please wait...
 

  1. Make a backup copy of your existing index.php file.
     

  2. Open file index.php in a plain text editor, such as Notepad.
     

  3. Inside index.php find the first two occurrences of this code:

    <input type="submit"
     

  4. After this code add:

    onclick="this.disabled=true;this.value='Sending, please wait...';this.form.submit();"

    Remember, do this twice - the first two times you find code in step 3.

    The final code should look like this:

    <input type="submit" onclick="this.disabled=true;this.value='Sending, please wait...';this.form.submit();" 
     

  5. Save changes, upload the index.php file to your server and test it.
     

That's it! Now, when your visitors click the "Submit" button when submitting a ticket, the button will be be disabled with the Sending, please wait message until the post is complete.

반응형

댓글