How can I prepopulate a field based on submission date?

  • pfeffer_alexander
    Asked on July 19, 2021 at 11:59 AM

    I would like to set up a condition for my notification email to say during which monthly quarter the form was submitted.


    Ex: If a form was submitted in June I would like the notification email to say "This form was submitted during the second monthly quarter"

  • John Support Team Lead
    Replied on July 19, 2021 at 6:18 PM

    You can do that by using a Date field, Form Calculation widget, and a few conditions. Here's how:

    1.) Add a date field into the form, set it to capture the current date, and hide or set it as read-only:

    1626731662 60f5f48e1e908  Screenshot 10

    2.) Next, add a form calculation widget into the form and set it up like this:

    1626732672 60f5f88070b9b formcall Screenshot 21

    You can also hide this field so your users won't see it when they fill out the form.

    3.) Add a Short Text field. We will need it for the description.

    4.) Then add the conditions to pre-populate the Short Text field with data based on the result of the form calculation widget.

    For example, if the widget's result contains "Jan" or "Feb" or "Mar", then insert "First Quarter" into the Short Text field:

    1626732968 60f5f9a82c5be  Screenshot 32

    5.) And lastly, edit your email notification and use the value of the Short Text field in the Email Subject:

    1626733089 60f5fa21dacfc emailll Screenshot 43

    And that's it! Here's the demo form: https://form.jotform.com/211996631367061