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.

Validation Rules on Variables?

brhaynes75brhaynes75 Member
in Bugs & Feature Requests edited February 2008
My shopping cart has a drop-down menu that has, say, sizes. The top of the list is a valueless option with the title "--choose size--"

BUT, if someone just hits "Add to Cart," and doesn't enter a size, then the shopping process proceeds as usual. There are no validation rules that can be applied. Of course, I did apply a basic validation.js validation rule, and it comes up "Please assign a size," but after hitting "ok" the modal window still pops up and the customer can continue without ever making a change to the size.

What can I do to ensure a variable is selected before completing the process?

Thanks in advance,
  • lukeluke FoxyCart Team
    Hey Brad. I know our docs REALLY need help... we're getting there. This is probably what you're looking for:

    Check out fc_PreProcess(). You can have it call your validator and if it doesn't like what it got back, just return false.
Sign In or Register to comment.