Im using a form with several fields. When the create form view is loaded,only a select field will be visible with other fields set to hidden. Once I change the options of the select field, specific fields regarding to the option will be visible and will be hidden. I did this using trigger event from form field options.
product_type:
label: Choose type
type: dropdown
options:
web: Web
mobile: Mobile
title:
label: Title
type: text
trigger:
action: show
field: product_type
condition: value[web]
It works good but since some specific fields has to be visible for two or more select options, I could not able to apply this method. Say, for example I want the price field to appear for both the web and mobile. But I could not able to set the trigger condition with additional value. I have referred this from the documentation. https://octobercms.com/docs/ui/input-trigger . Yet its not working
price:
label: Price
type: text
trigger:
action: show
field: product_type
condition: value[web][mobile]
At present I have solved this problem by definig filterFields method in model. https://octobercms.com/docs/backend/forms#filter-form-fields. Also I know how to do this in js
But what I want to know is that why the trigger condition is not supporting multiple values. Or did I made any mistake. Or should I have to include something else ?