This is basic coding so I’m sorry for asking such a simple question but I can’t figure it out and I’m hoping someone can help.
I’m trying to display a “pending” message so that when a customer clicks the submit button to make a payment it will display a “your transaction is processing” message below the submit button… that way they don’t click the button twice and get charged twice.
I created the message I want displayed and gave it the id #pending… but I don’t know how to code it to display on-click since there are already functions happening on-click for that button including user input like name,email,etc.
\
How about something like this Youtube video tutorial here that gives you a loading gif whilst something is saving, which you can change to suit your own needs.
Add a Preloader to your WiX Site in 4 min’s!
Otherwise, you can look at having a lightbox open up after the user clicks on the submit button that simply states your payment is pending etc. and then close when the payment is complete or the user is moved onto another page.
If you are using Wix Pay, then you can see examples in the Wix Pay API Reference for it.
https://www.wix.com/corvid/reference/wix-pay.html
https://www.wix.com/corvid/reference/wix-pay-backend.html
Thanks for this! I was able to adpat part of the preloader code to accomplish what I wanted!