This page shows off how you can now override the default mechanism for dependencies. In v1, dependencies could only control whether or not a field was required. The createDependencyTo() mechanism can be very useful, but there are times when you want to do more than just check to see if a field is required.

In v2, you can now change the behavior of dependencies by overriding the default setDependency() method. You can do this per field or for the entire qForm library. In the examples below we use dependecies not only to force fields to be required, but also to toggle fields from being disabled and to change their styles.

Contact Information

Require the field 1.
Disable the field 2.
Change the style of the field 3.
Make "Require the field 1" checkbox required.