how to skip a form element in a dependency chain
Hi,
I have the following situation:
dropdownlist1 with choices (A, B, C , D)
autocomplete2 depends on dropdownlist1 if the user selects A, B, or C
dropdownlist2 depends on autocomplete2 if the user selected A,B,C OR depends on dropdownlist1 if the user chose D
The actual example is 3 ways of selecting a species (common name, scientific name, ID) or include all species in dropdownlist1. For include all species, I would not need an autocomplete that lets the user select a name or ID, I could go to the next selection step in dropdownlist2.
What I've tried so far:
- Use a combination of dependency for A/B/C and activate dropdownlist2 if D is selected - the enable property does not seem to be what dependOn works on? it's always set to true, even when not active
- Create a fake hidden autocomplete for D and make a selection pro grammatically - I failed at the point where I can set a current element item in the autocomplete, but I cannot submit it to trigger the dependency to activate dropdownlist2 (this seems to be the most promising - suggestions?)
- Branching off multiple form elements that depend on dropdownlist1 - created too many branches as this situation is repeated with other selection criteria later in the chain
- Creating the dependsOn logic programmatically - I'll have a chain of about 8 elements that depend on each other with multiple choices, collections that would all need to be cleared if anything in the hierarchy above is reset etc. - would like to avoid this since dependsOn generally works so well.
If you have any suggestions, please let me know.
0
-
I think the solution would have been:
- hide both dependent children of dd1 by default
- on change to the parent, get user selection in the subworkflow
- show the appropriate child and hide the other based on user selection with the "Show Form Element" activity
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar