The Display Logic module allows you to add conditions for displaying or hiding certain form fields based on client-side behavior. This module is incredibly useful to make forms much more professional by showing only the appropriate fields and without adding a lot of custom JavaScript.
Example usage...
$products->displayIf("HasProducts")->isChecked();
$sizes->hideUnless("ProductType")->isEqualTo("t-shirt")
->andIf("Price")->isGreaterThan(10);
$payment->hideIf("Price")->isEqualTo(0);
$shipping->displayIf("ProductType")->isEqualTo("furniture")
->andIf()
->group()
->orIf("RushShipping")->isChecked()
->orIf("ShippingAddress")->isNotEmpty()
->end();
There are many more examples on the module readme.md