How to display a date in a textbox based on a selection from a dropdown field?

  • kranai
    Asked on May 21, 2016 at 10:18 AM

    Hi

    How do I display a text string in a text box if some condition is met.

    Let say my text box is called "Event Date"

    I will  insert the condition in my form as follows:

    If "Seminar Title" is Equal to "Creating Abundance" (for example)

    Display "26th May 2016" into Event Date

    Basically I want to populate "Event Date" with the date of the seminar based on the Seminar Title selected.

     

    rgds

    kish

     

     

  • Welvin Support Team Lead
    Replied on May 21, 2016 at 11:30 AM

    Do you want to populate a date field? If so, you can do it this way:

    1. Add a new DateTime field in the form and set the default date to May 26, 2016.

    How to display a date in a textbox based on a selection from a dropdown field? Image 1 Screenshot 30

    2. Add a conditional logic to copy this new date field to the target DateTime field when seminar title is equal to your desired value. Here's a sample condition that you should add:

    How to display a date in a textbox based on a selection from a dropdown field? Image 2 Screenshot 41

     

    You can test it here: https://form.jotform.com/61404080498960

    Note that you can simply hide some fields that you don't want to show up in the live form view.

  • Welvin Support Team Lead
    Replied on May 21, 2016 at 11:35 AM

    I'm sorry for misunderstanding your question. To populate a textbox with a date, you can just do it this way:

    1. Assuming that you already have the textbox in the form, simply add the following condition:

    How to display a date in a textbox based on a selection from a dropdown field? Image 1 Screenshot 20

    Make sure that you've added the value as a text. It should be in light brown background.  

     

    You can see the output in the test form that I've shared in my first reply. 

  • Welvin Support Team Lead
    Replied on May 21, 2016 at 12:39 PM

    You're welcome. Please contact us again if we can help in any way.