davidfilmer
Junior Member
Posts: 3
Registered: 11/12/2004
Member Is Offline
|
| posted on 11/12/2004 at 05:47 AM |
|
|
Suggestion
This is a pretty good form checker. But there is one thing that's missing - something I use all the time.
It would be nice to be able to require one formfield depending on the value of another formfield. For example, suppose you had a radio-button list
like this:
0 My favorite color is [pulldown list]
0 I don't have a favorite color
The first item on the pulldown list is empty.
The user could click the first radio, but not select something from the pulldown list. But I can't require the pulldown list all the time because
they might pick the second radio button.
It would be nice to require a selection from the pulldown list based on whether the first radio has been selected.
Thanks for listening.
|
|
|
tigra
Administrator
Posts: 1976
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 11/12/2004 at 02:52 PM |
|
|
dependencies can be checked using Tigra Form Validator PRO
|
|
|
davidfilmer
Junior Member
Posts: 3
Registered: 11/12/2004
Member Is Offline
|
| posted on 11/16/2004 at 09:14 PM |
|
|
really?
That's very good to know - I would gladly purchase PRO in an instant...
except that I cannot find this feature described in the docs (http://www.softcomplex.com/products/tigra_form_validator_pro/docs/)
Can I ask you to elaborate on how this would be accomplished in PRO (or point me to the relevant docs if I missed something)?
Thanks!
|
|
|
tigra
Administrator
Posts: 1976
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 2/17/2005 at 06:32 PM |
|
|
With PRO version of the script you can hook own javascript function on field validation. In that function you check fields current value is dependent
on and return the result of validation to the script. Custom error messages are also supported.
|
|
|
krzyzaniak_piotr
Newbie
Posts: 1
Registered: 5/24/2007
Member Is Offline
|
| posted on 5/24/2007 at 09:38 AM |
|
|
Examples???
Where can I find some examples with this option? I can't find it. regards
|
|
|
tigra
Administrator
Posts: 1976
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 5/24/2007 at 02:34 PM |
|
|
in demo3 included in the distribution package of Tigra Form Validator PRO:
'rate' : {'l':'Rate','r':true,'f':function(n) {return n > 0 && n < 6},'t':'t_rate'}
all you need is provide the reference to the custom function in 'f' property.
|
|
|
rimbertr
Junior Member
Posts: 5
Registered: 1/25/2006
Member Is Offline
|
| posted on 7/13/2007 at 10:29 PM |
|
|
demo3 shows how you can put your own function to validate but the function in the example only validates on a range of numbers, not dependent on
another field. Can you provide a sample function that validates depending on another field's value?
I would like to validate something similar. For example:
Which flavors of ice cream do you like (check all that apply):
o Chocolate
o Vanilla
o Strawberry
o Other: ___________
I would like them to select at least one of the options. But if they select Other, I want to make sure they put something in the blank line.
Right now, I have it set up as an option group (using checkboxes) and I can validate that they select at least one of those options. But if they
check Other, it doesn't check that the blank line (which is a text field) is filled out.
Any help/examples would be appreciated.
|
|
|