The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Conditionally show required field?

a9ka9k Member
in Help edited December 2008
You have a great example for required term and conditions but I have a more of a problem. Only one product in our catalog needs the terms and conditions to be displayed and agreed with. It's a subscription advice service.

So my question is: How would you do make a required field conditional based on a particular product category being in the cart?
Comments
  • brettbrett FoxyCart Team
    Good question.
    What I'd do is check the JSON on the checkout, and if the product is in the cart you could add the required class to the checkbox and show() the container. Else keep it not required and hidden.
Sign In or Register to comment.