I want to submit an action in Slate as soon as a dropdown value changes (the action should take the selected dropdown value as a parameter).
The dropdown: w_dropdown_1
The action form: w_foundry_action_1 with
I added an event like the one below:
But my action is sometimes submitting with the previously selected dropdown value.
This happens because the action updates its parameter based on the dropdown at the same moment that the form is submitted with neither event necessarily occurring before the other.
Instead of triggering the action as soon as the dropdown changes, you can add an event to validate the action form:
When the dropdown value changes, the action form w_foundry_action_1 will be validated. Once successful, it will submit the action with the correct value.