Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Form Validation Dependency?!? HELP!!
ludachris
Newbie

Posts: 1
Registered: 4/6/2005
Location: houston
Member Is Offline
posted on 4/6/2005 at 06:31 PM Reply With Quote
Form Validation Dependency?!? HELP!!


Goal: Have a form that users can fill out and based on a previous selections, certain fields will be validated.

Problem: I cant do it!

What would be the best way for one to go about doing this? I am definitely not the smartest with javascript. I tried using an if statement for a_fields but the script pulls that info right when the page loads. Is there a way to modify the a_fields based on radio button selection?

I tried using onSubmit="javascript:Which();" instead of v.exec() and I made the function


function Which() {
if (document.registration.booth_design.value == "tictactoe") {
return x.exec();
}
else {
return v.exec();
}
}


and

var x = new validator('registration', b_fields, o_config);

With b_fields having less fields than a_fields. The page seems to work, if I check the button that inputs tictactoe it only prompts me to change the fields in b_fields. And if I dont choose the button that inputs tictactoe it prompts me to change the fields in a_fields. BUT after I hit OK, rather than highlighting the fields to change it tries to continue with the form action rather than allowing me to change the data in the fields.

Let me know if any of this does not make sense. Thanks a bunch in advance to anyone who might be able to help!!
View User's Profile View All Posts By User U2U Member
Seitz333
Newbie

Posts: 1
Registered: 6/12/2006
Member Is Offline
posted on 6/12/2006 at 02:08 PM Reply With Quote

I too would like to be able to do this.

I want to turn on/off validation for a field based on the users selection of a different field.

1. If User selects 'NO' for Question #1, then validation for Question #2 is false.
2. If User selects 'YES' for Question #1, then validation for Question #2 is true.

Thanks
View User's Profile View All Posts By User U2U Member
chandero
Newbie

Posts: 1
Registered: 7/20/2006
Location: Dover Delaware
Member Is Offline
posted on 7/20/2006 at 07:56 PM Reply With Quote

I would also like to be able to designate a field as being validated if some other field has a value.

Our form uses multipe rows which are hidden until a user needs another row.
When they do they make a selection in the first field and then the other fields in that row need to be validated. If the row does not have a selection in the first field then all fields in that row are ignored, even if they have data in them.

Please provide this functionality to a very nicely done product.

Thank you
Bob Blaney
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 7/21/2006 at 11:53 AM Reply With Quote

in PRO version of the script you can feed the name of the function to the field's format property. The validator will call that function and check for the result. If false is returned then validator will report the format error. You can use this feature to attach custom function which makes all the dependency checks firs and then validate the data if needed.

http://www.softcomplex.com/products/tigra_form_validator_pro/docs/#field_format (third option)

With free version you'll have to modify the script's code to implement dependency checks.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page Product Page
Product Demonstrations Product Demos
Registration Form Validation
Login Form Validation
Free Download Free Download
Product Documentation Documentation
Documenation Page
Change Log
Validators Comparison Table
Support Forum Support Forum
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004