How can I trigger this function on submit?

eddietibbitts
New Member
2 0 0

Screenshot 2021-11-06 at 09.13.11.png

I'd like to trigger this function when the user inputs their code and hits submit. 

Where am I going wrong?

Thanks!

Eddie

Replies 2 (2)
eddietibbitts
New Member
2 0 0

I am getting the following error: 

q-bar-validate:1494 Uncaught ReferenceError: querycode is not defined
at HTMLInputElement.onclick (q-bar-validate:1494)

MichalKopec
Tourist
9 1 2

It's likely because the function is defined after the <form> block. Try to move it before.

Have a problem with your Shopify store? Time is money! Let me fix that for you for a fraction of the opportunity cost. Contact me for details.