Hello ,
I created an order portraits form and I make a code that when the user submit the form the payment method appear.
Everything is fine here .
The problem is when there is an error (for example the user forgot to type a required input) the payment method still appear when the user click submit although the form didn’t submitted yet and gives an error.
How can I prevent appearing the payment method if the form give an error.
Thanks for advance