Hide service dialog elements dynamically

Hi guys,

I’m working on creating a custom service dialog for ordering a service. There are a few elements, which does not make sense to show, if other elements are set to no.
(e.g. if the user does not want to use external NTP, the NTP server URL textbox should be hidden)

I successfully created a helper method, which can hide a given textbox, if a given boolean is set to no. However I have many fields which should be visible based on other field’s states.

I’ve tried to modify the method to get the boolean element name as a parameter, but there’s no way to add the arguments to the service dialog. To achieve that one have to manually edit the service dialog’s YAML file and manually add the ae_attributes, which seems a bit odd.

What is the easiest way to have multiple dynamically visible elements without writing a custom method for each of them?