Can anyone give me a suggestion on how to make a Product Text Modifier required in Store. I know this option is available for the Checkout Tag with the "Required" parameter, but not for the Product Tag.

I have a number of text modifiers that need to be filled out before the customer can add the item to their cart. Is there a better way of doing this in Store instead of having to write Javascript code to test the fields.

EE 2.5.5 Store 1.6.2

thanks, Shannon

1 Answer 1


There isn't any server-side error handling on the add to cart form, so there isn't any way to make text modifiers required (aside from the fact that modifiers normally vary from product to product, which would make it hard to specify in the template).

The best and easiest way to do this is using Javascript, as you suggested. A simple form submit function would be enough, though if you want you could get really fancy with your form validation/error handling.

$("#submitbtn").click(function() {
    if ($("#textfield").val() === "") {
        alert("Please enter a value!");
        return false;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.