Last active
June 13, 2018 08:41
-
-
Save mgladdish/bb9cc77239d723f577531d9756554531 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
section( | |
messages = "sectionText", // the name of properties bundle containing section-level text | |
nestingCheckboxes( | |
"myCheckboxes", // the unique name of our widget | |
"questionWording", // the name of the properties bundle containing text for the widget | |
required, // constraints applied to the widget | |
"contactMethods", // the name of the properties bundle containing the key and labels for each checkbox choice | |
Map( // our nested widgets | |
"EMAIL" -> // the key from contactMethods with which to associate this nested iwdget | |
nestedInput( | |
"email", // the unique name of the input text widget | |
"questionWording", // the name of the properties bundle to fetch text for the widget | |
required, // constraints applied to the widget | |
showWhenWidget("myCheckboxes") hasValue "EMAIL" // make this widget visible only when the "EMAIL" checkbox is selected | |
), | |
"PHONE" -> nestedInput("phone", "questionWording", required, showWhenWidget("myCheckboxes") hasValue "PHONE"), | |
"TEXT" -> nestedInput("text", "questionWording", required, showWhenWidget("myCheckboxes") hasValue "TEXT") | |
), | |
asColumn // display the checkboxes in a vertical column, rather than in a horizontal row | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment