Conditional Logic on Forms

Welkin’s Form Designer supports conditional logic to show and hide fields on forms. To use this functionality, the sections, questions and answer fields must be added to the form first. Once all of the questions and answer fields have been added, go to the “Conditions” tab within the form configuration to add your show/hide logic.

In the following scenario, I want to show a question “Enter LMP” or “Enter EDD” based on which date type will be used to calculate the gestational age. 

Condition logic needed:

If date type = LMP then show “Enter LMP” question

If date type = EDD then show “Enter EDD” question

Steps to configure the conditions for the scenario above:

  1. Go to the “Conditions” tab in the form configuration.
  2. Click “Add Element”.
  3.  Choose the section of the form where the fields you want to show/hide are located
  4. Choose the field you want to show/hide (for scenario above FIeld #2).
  5. Choose the condition(s) that need to be present to “show” the field in Step 4 above – Click “Add Condition” within Element #1.
  6. Add the conditional logic needed to show the question/answer field  “Enter LMP” (gestational-age-calculation: enter-date).
    1. Explanation of the configuration above (Element #1):
    2. In Section = Gestation age calculation show Field #2 (gestational-age-calculation: enter-date) if Field #1 (gestational-age-calculation: date-type) = LMP
  7. Set up another Condition Element for the “Enter EDD” question.
    1. Explanation of the configuration above (Element #2):
    2. In Section = Gestation age calculation show Field #3 (gestational-age-calculation: expected-delivery-date) if Field #1 (gestational-age-calculation: date-type) = EDD
    3. NOTE: Operation “And” includes all conditions (if there are multiple), Operation “Or” includes any of the conditions (if there are multiple)
  8. Outcome of the configuration for conditions in the form. Questions for Enter LMP and Enter EDD are hidden until the conditions are present to show them:
  9. When date type = EDD
  10. When date type = LMP