add condition on a value of multiselect (in_array functionality)

Notice: This thread is very old.
richard
Member | 60
+
0
-

Hello,

how to add condition on a value selected? Something like in_array(‘e’,$values)…
Is there something better than encounter all the combinations?

<?php
        $form->addMultiSelect('item', 'Label', array('a','b','c','d','e'))
             ->addCondition(// if 'e' is selected, meaning anything plus 'e')
             ->toggle('something');
?>