Last active
November 27, 2018 18:18
-
-
Save rjcorwin/b54356fdeb075f49293212eb370975a5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| if (inputs.location.value[3]) { | |
| let selectedLocationNode = Loc | |
| .flatten(inputs.location.locationList) | |
| .find(node => node.id === inputs.location.value[3]) | |
| if (selectedLocationNode.label === 'Other') { | |
| // Do something. | |
| } | |
| } | |
This file contains hidden or 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
| if (inputs.location.value[3]) { | |
| let selectedLocationNode = inputs.locationList | |
| .locations[inputs.location.value[0]] | |
| .children[inputs.location.value[1]] | |
| .children[inputs.location.value[2]] | |
| .children[inputs.location.value[3]] | |
| if (selectedLocationNode.label === 'Other') { | |
| // Do something. | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've inserted this as a final version:
if (typeof inputs.location.locationList != 'undefined'
&& inputs.location.value[3].value != 'undefined'
&& getValue('other_county') == '' && getValue('other_district') == ''
&& getValue('other_location') == '' && getValue('other_school') == '') {
let selectedLocationNode = inputs.location.locationList
.locations[inputs.location.value[0].value]
.children[inputs.location.value[1].value]
.children[inputs.location.value[2].value]
.children[inputs.location.value[3].value]
if (selectedLocationNode.label === 'Other, please specify') {
inputShow('other_location')
inputShow('other_school')
} else {
}
}