Have you ever had a page type or DataObject that has fields that should only be displayed if other form fields are set a certain way? Imagine an object that can take either an internal link (TreeDropdownField) or an external link (TextField). If one is filled out, the other should not display.
The Display Logic module allows you to create a very verbose set of logic that, when evaluated, determines whether the field should show or hide. And it $looks->absolutely(“Beautiful”)->thanksTo(“chainable methods”)!
Best of all, it works with Bootstrap Forms!
$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();
Please checkout the Github page for more information, including documentation.