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?
  • 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.