I have an Array "teiln_dat" with 0 to 2 Elements like "yyyy-mm-dd".
I want to show or hide a further field depending on the condition that "teiln_dat" has 2 Elements.
I tried with a php104 as an Event switcher:
if (isset($this->data['teiln_dat']) && is_array($this->data['teiln_dat']) && count($this->data['teiln_dat']) === 2) { return 'yes';} else { return 'no';}
but seems not to work.Is there a better solution that works in the browser or likely a JSsript?