Problem/Motivation
Currently the button "Add another state" is only appearing for elements which are multi value. This doesn't apply to the submission handler. In order to meet the complex business rules of our client, we would need to have support for multiple AND/OR/XOR conditions in the submission handler screen.
Steps to reproduce
- Add a webform submission handler (e.g. email).
- Go to the conditions tab
- See no button "Add another state"
Proposed resolution
Allow submission handlers to have multiple conditions
Remaining tasks
Provide pull request
User interface changes
The "Add another state" button is available for webform submission handlers
API changes
N/A
Data model changes
N/A
Comments
Comment #2
jrockowitz commentedFor handlers, you can either disable or enable the handler; there are no other applicable states.
In the single #states trigger you get set up complex conditions by editing the sorce.
Comment #3
bramdriesen@jrockowitz Thanks. Is there any reason why this is not supported? Would if have implications if we would be able to create multiple conditions inside one handler?
Comment #4
jrockowitz commentedThere is no reason to support multiple states/conditions via handler, you can either enable or disable a handler. You can create multiple triggers with AND/OR/XOR conditions.
Comment #5
bramdriesenOkay! Gotcha :-) I'll tell the client to create a separate mail handler. Although I still have the feeling the use case could/should be supported by the handler.
Their requirement is quite simple. They have a postal code field on a webform. Postcodes A B D should mail to A and postcodes C E F should mail to B.
So it would be multiple OR conditions with multiple sub OR conditions