maximum value text box

di diver165 03 Jan, 2011
I'm a ChronoForms user from way back. I'm loving the newest version! Much more easy to use. But I need a little help.

How would I validate a form that asks for a list of supplies? But each listing has a maximum number the person can order. Say the user logs into the site and orders paper towels. The current maximum they can order is 12 rolls. How would I validate that so that they can not put down more than 12?

My ideal situation is to have all the values prepopulated with 0 and when the user clicks in the box to put the amount the zero disappears and they can type the amount they need.
Gr GreyHead 03 Jan, 2011
Hi diver165,

I'd suggest that you do this by uing drop-downs to limit the user choices. That's a much more reliable (and easier) approach than writing JavaScript validations.

It can clearly be done with JavaScript and the LiveValidation library that ChronoForms uses has the functionality that you need. But you have to pass the parameters over for each field and create the code to read and apply them.

Bob
This topic is locked and no more replies can be posted.