Want to make work a button only when mandatory fields are valid

Hello,

My product has different custom fields to be able to customize it. The product page has 2 buttons. One of them saves the customization once the mandatory fields are valid and redirects to the checkout and the other one saves the customization into the cart once the mandatory fields are valid and refreshes the product page to be able to start a new customization.

Right now the second button is working even if the mandatory fields are not valid so I need that this is fixed but I don’t know which part of code I should edit or add.

Thank you

Hi @viaco ,

Can you share your product url to check.

Hi @gr_trading

I just shared it with you through private message.

Thank you so much for your reply

@gr_trading I noticed that this also happens with the “checkout” button when you have not even started the customization. Just to note it.