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
Conditional validation js format
#1
Hello all,

I am hoping some one can point me in the right direction here.

I have a form where I need to validate a field based on whether another field has been selected but I cant quite crack it as my jquery skills arent great.

I have a checkbox named "home_loan", if a user checks it then they need to fill out a textbox field named "buynew".

If someone coudl tell me how to modify this line to get it to work that would be fantastic.

rules.push("required,home_loan,Please chose a loan type.");

Cheers
Reply
#2
Yea, I'd like this, as well, but I don't think the included validation script was designed for this purpose. It can probably be done with a custom regex validation, but I'm no good with that, either.

Actually, I've been trying to take it one step further and figure out how I can disable/enable a field depending on which of two radio buttons are currently selected. But I can't figure that out either, as I suspect it would require the page to be reloaded (an onClick even, for example) to go back and forth.

Adding my two cents here to stay subscribed. Smile
Not a FT employee, just a FT user lending a hand. If I've been helpful, please rate.

[Image: giraffe_long_85.gif]
Reply
#3
ah I think it should be achievable it just needs some sort of "if" statement, which I don't know how to write Tongue
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)