Can you add an action to a dropdown? Like a trigger

JC:
Can you add an action to a dropdown? Like a trigger after a selection is made…


Andrew Dam:
What kind of dropdown is it? vueMultiSelect or HTML?


JC:
vueMultiSelect in the form currently


Andrew Dam:
You can add an onChanged_actions key to your field that accepts an array of actions that trigger on selection. Here’s an example:

{
            "label": "Simple Select",
            "model": "vehicleSelected",
            "onChanged_actions": [{
                "action": "showAlert",
                "options": {
                    "text": "This is the alert message text",
                    "title": "Hello World",
                    "type": "information"
                }
            }],
            "placeholder": "Select a Vehicle (Select item)",
            "required": true,
            "selectOptions": {
                "closeOnSelect": true,
                "multiSelect": false,
                "searchable": false,
                "showLabels": false
            },
            "styleClasses": "col-md-3",
            "type": "vueMultiSelect",
            "validator": "required",
            "values": ["Car", "Boat", "Cottage", "Motorcycle", "Unicycle"]
        }

JC:
Awesome, this will work perfect. Thanks