New Trigger for Gibbon

Hello

how does triggers work in Gibbon?
I want to react (with a function) on a item change in a dropdownbox.

Does Gibbon already have something like this?
Can i work with "toggleVisibilityByClass" to call my own function?

Comments

  • Hi Redga,

    Yes, you can use the toggleVisibilityByClass to make things appear or disappear based on the dropdown. The syntax looks something like:

    $form->toggleVisibilityByClass('className')->onSelect('fieldName')->when('value');

    In this case, if your dropdown field was fieldName, anything with the class className would become visible when value is selected. Then, you can use the addClass() method to add the class to the rows or fields you want to toggle.

    Hope this helps!
    admin
Sign In or Register to comment.