disable button “add to cart” when the field is required.
-
Hi! It is possible to deactivate the “add to cart” button on the product file until data is entered in the required fields.
When creating products with variations, if an option is not selected, the “add to cart” button is deactivated. but when I use the plugin to add a “required” text field, it is not deactivated, but a notification that the data is required.
I have had these problems with the cart sidebar, since it opens the same, that is, when I have a required field and do not add any data, and I click on “add to cart” the cart sidebar opens (with ajax ), nothing is added and a notification is sent that the data is necessary.
What I would like is that if the data is required, the “add to cart” button is deactivated, thus preventing the mini cart sidebar from opening.
I have also had problems using “conditionals”, that is, if there is a selection, it will show a textarea field, but it does not validate it if I set it as “required”. that is, if I click on “add to cart” it adds the same with the blank space.
Thanks in advance!!
- The topic ‘disable button “add to cart” when the field is required.’ is closed to new replies.