FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Validate two fields...
#3
(Sep 19th, 2009, 1:16 PM)Ben Wrote: Hi Checog,

Sure, no problem! For the PHP validation, that's no problem - you can just test for the city value, then run the appropriate validation rules. For JS, you need to use the following rule format:

Code:
rules.push("if:city=Vancouver,required,field1,Please enter field 1.");
rules.push("if:city=Seattle,required,field2,Please enter field 2.");

In that example, field1 will only be validated (checked it's been filled in) if and only if the user has selected Vancouver in the city field.

Hope this helps!

- Ben

For example, how to validate:

If I have a field City and field regcode, city field its type select and regcode its text type, user have to enter this value manually

In regcode field, If city=Vancouver and regcode= 1125 or 1518 or 2115 or 3425 its valid, any other value its incorrect

Each city have about four or nine valid regcodes, I want to validate that each user insert a valid code for the city that has been select.
Reply


Messages In This Thread
Validate two fields... - by checog0 - Sep 18th, 2009, 3:10 PM
RE: Validate two fields... - by Ben - Sep 19th, 2009, 1:16 PM
RE: Validate two fields... - by checog0 - Sep 21st, 2009, 8:17 AM
RE: Validate two fields... - by checog0 - Sep 21st, 2009, 3:40 PM
RE: Validate two fields... - by Ben - Sep 26th, 2009, 11:01 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)