Formtools JS dependency validation

Hi there,

Is there a way to create dependency validation using formtool ftValidation? If not is there a simple way to achieve this?

Thanks.

Can you elaborate on what you mean by “dependency validation”?

FarCry forms use an old version of the jQuery Validation plugin (1.9), and you can get some sense of what JS is required to add validation options by looking at the creditcardexpiry formtool in core (/core/packages/formtools/creditcardexpiry.cfc).

If you’re more interested in a field that updates with different options depending on what is entered in another field, there is the ftWatch attribute. A good example of that is the state formtool in core, which can be set up to show the states/provinces of a country selected in another field.

Let us know what you’re trying to do and we can add some more detail.

Blair

Hi @blair

Thanks for the quick response.

What I’m trying to achieve is to make a certain field required when the value of another field is equal a certain value.

I’ll have a look at the code you suggested.