Conditional Logic: Hide or Display Form Fields Based on Odd or Even Calendar Months

  • Profile Image
    info72_info872
    Asked on March 20, 2026 at 5:36 PM

    I would like to add conditional logic to my form that uses the calendar month to determine whether a form field is hidden or displayed. I want to hide a form field on odd months and display that form field on even months. Is there a way to do this?


  • Profile Image
    Joeni JotForm Support
    Replied on March 20, 2026 at 6:06 PM

    Hi info72_info872,

    Thanks for reaching out to Jotform Support. Jotform’s conditional logic doesn’t have a built‑in way to check the calendar month and automatically show or hide fields. A simple workaround is to add a Date Picker field to your form and set it to default to the current date, so it fills in automatically when the form loads. From there, you can build conditional rules around that date to control whether a field is visible or hidden. Let me show you how:

    1. In Form Builder, click on the Add Element button in the upper left side of the panel and select the Date Picket element under the Basic tab.
    2. Now, add it to your form, click on the Gear icon and go to the Options tab.
    3. Then, select the Current option in the Default Date menu.

    
Conditional Logic: Hide or Display Form Fields Based on Odd or Even Calendar Months
Image-1 From there, you can add a Substring widget to pull out the month portion of that date. Let me show you how:

    1. In Form Builder, click on the Add Element button in the upper left side of the panel and go to the Widgets tab.
    2. Now, search for the Substring widget and add it to your form.
    3. Then, add #day_4 in the Source field ID input box, enter 0 Substring start and 2 in the Substring end.
    4. Finally, click on the Update button.

    
Conditional Logic: Hide or Display Form Fields Based on Odd or Even Calendar Months
Image-2 Once you’ve isolated the month, add a Form Calculation widget to process the result and give you a clear numeric outcome. Let me show you how:

    1. In Form Builder, click on the Add Elements button and go to the Widgets tab.
    2. Now, select the Form Calculation widget, add it to your form and click on the Add Field button in the widget settings.
    3. Then, select the Substring widget in the Dropdown Menu and click on the Save button.

    
Conditional Logic: Hide or Display Form Fields Based on Odd or Even Calendar Months
Image-3 Once you’ve set up the Date Picker, Substring widget, and Form Calculation widget, you can finish by creating a conditional rule. Use the numeric result from the calculation to decide whether the field should be visible: if the number is odd, hide the field; if it’s even, display it. Take a look at the screenshot of the result below

    
Conditional Logic: Hide or Display Form Fields Based on Odd or Even Calendar Months
Image-4Give it a try and let us know how it goes.