OpenSpecimen supports the use of skip logic i.e. to shows/hide one or more fields based on the value of another field, in custom forms.
...
Example form definition XML with skip logic: GeneticHistory.xml, Smoking History
Check the syntax of the "showWhen" tag in the above XML.
...
Condition: Display 'FOBT Results' field when the value for 'FOBT Results' is either one of 'Positive' or 'Negative'
Syntax:
<showWhen><![CDATA[fOBTResults = "Positive" or fOBTResults = "Negative"]]></showWhen>
Example of skip logic to hide/show a subform
...
Syntax (to be added just above the subform control name): <showWhen><![CDATA[familyCancerHistory = "Yes" ]]></showWhen>
When 'Family Cancer History' value is 'No', subform does not appear.
...