Can Fields Be Shown or Hidden Based on a Default or Selected Date?

  • Profile Image
    Asked on September 23, 2015 at 08:34 AM

    Meaning if I have a drop down box, that I want to include just the next 3 months, is it possible to do that.

    So if it is september now, the box would drop down, OCT, NOV, DEC. But next month the drop down would be NOV, DEC, JAN

  • Profile Image
    Answered on September 23, 2015 at 01:44 PM

    Yes, this is possible. Please have a look at this form which you would recognize as being based on yours. If you were to clone it, you would notice that numbers are appended to the labels of the month fields. This was just to avoid any confusion while creating the conditions:

    However, once conditions have been tested and have been found to be functioning correctly, those numbers can be removed.

    To achieve the show/hide dropdown functionality what I did was:

    1. Add 12 month dropdowns and edit their options accordingly

    2. Insert a Form Calculation widget (See our widget guide)

    3. Add the second date field to its work area and then click 0-9 to change it to a-z and the button from orange to grey:

    4. Create 12 conditions attached to that widget to capture the first two (2) digits (the month) of the the date. The Form Calculation widget was necessary because there's no Starts With condition available for date fields:

    5. Hide the calculation field:

    6. Set the form to clear fields on their being hidden:

    This is necessary so that if a selection is made in a month field and then that field becomes hidden if a different date is selected in the date field, the selection is cleared.

    That's basically all I did but if you would like clarification on anything, please inform us.


  • Profile Image
    Answered on September 24, 2015 at 12:47 AM
    Thanks, that is really helpful.
  • Profile Image
    Answered on September 24, 2015 at 09:39 AM

    In behalf of my colleague, you are welcome. Glad to hear that the suggestion helped.

    Should you need any assistance again, feel free to open a new thread here in the forum.

    Thank you.