Toggle Visibility of Form Items from a Check Box
I am working on a workflow to allow users to search for three different resources near them: dentists, WIC locations, and family resource centers. I have a display form with a check box for each resource. However, I want to be able to apply an age when they search for dentists. I have a text box set up for age with the visibility off as default. Is there a way to toggle the visibilty of that text box on and off based on whether the dentist check box is checked or not?
Currently, I am working around it by putting the Age text box On the second display form where the user enters an address. However, I would like to add an option for users to search with their current location. In that case, I would like to just have the one display form with the check boxes instead of having to add in a second display form with just the age. Does anybody know if it's even possible to toggle the text box on and off in the display form with the check boxes?
0
-
That worked perfectly! Thank you so much, Nico! You're awesome! 0 -
Following up with a slightly more complex version:
I have 5 checkboxes and want to make a group visible when 2 or more or checked.
Setting the visibility in the Form Designer works great for the group visibility contingent on one checkbox, but I can't find a way to have visibility contingent on multiple checkboxes.
I've tried entering both checkbox ids into the Form Designer, which didn't work (e.g. CheckBox2 and CheckBox3).
I've also tried assigning the Group visibility in the RuntimeModifications. I've used this successfully in other workflows to set group visibility, but never based on another form element (i.e. I've used data values as conditions). In a simplified effort to just use RuntimeModifications for this task at all, I tried using an If statement with the following settings:
Condition form.Find(Of CheckBoxFormItem)("CheckBox2").Checked
Then Assign form.Find(Of ContainerFormItem)("Group6").IsVisible = True
Else Assign form.Find(Of ContainerFormItem)("Group6").IsVisible = False
Should this work/is this a limitation of Essentials Workflow? Is this something that would only be available using the dynamic forms of Workflow5?
Thanks,Jena0 -
Hi Jena,
You can set like this:
form.Find(Of ContainerFormItem)("Group6").VisibleControlID=form.Find(Of CheckBoxFormItem)("CheckBox2").ItemID0 -
Ming Gang Shao -
Thanks for the suggestion, but I am ultimately trying to set the visibility of that group based on 2 checkboxes.
Using the VisibleControlID property does allow this to be done in the runtime modifications, but I can't get it to work with multiple inputs (e.g. form.Find(Of ContainerFormItem)("Group6").VisibleControlID=form.Find(Of CheckBoxFormItem)("CheckBox2").ItemID & form.Find(Of CheckBoxFormItem)("CheckBox3").ItemID ).0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
5 kommentarer