How can I populate a Time or date field through a condition?

  • Rory81
    Asked on January 19, 2015 at 11:15 AM

    My company has 2 facilities, one of them starts operations at 08:00 and the other one at 09:00. On the form I am working for daily reports, first thing is to select the facility through a Radio Button, then I'd like the form to automatically populate the field "Start time" depending on the facility selection. If the user selects "facility A", the time field should show 08:00 by default. If they select "facility B", the time field should show 09:00 by default.

    I'm pretty sure it is possible through a condition since it is very easy to pass a number or a string to any field, but I don't know what format to use for a time or date.

     

    Thanks a lot,

    Rory

  • Charlie
    Replied on January 19, 2015 at 12:43 PM

    Hi Rory,

    It seems that it is not possible to prepopulate the Time field. What I could suggest is using a plain text box and add conditions to your "Facilities" field to update the field in a plain text box. You can check the screenshot on what I did.

    1. Add a radio button and a plain text box to your form.

    How can I populate a Time or date field through a condition? Image 1 Screenshot 40

    2. Choose "Update form field" under conditions.

    How can I populate a Time or date field through a condition? Image 2 Screenshot 51

    3. Then I setup the rules and conditions here.

    Basically my conditions are:

    If Facilities is equal to "A" the Time field with be "8:00 AM".

    If Facilities is equal to "B" the Time field with be "9:00 AM".

    If Facilities is equal to "C" the Time field with be "10:00 AM".

     

    How can I populate a Time or date field through a condition? Image 3 Screenshot 62

     

    You can check the demo form here: http://www.jotform.com/form/50184872245962

    I hope it helps. Let us know if you need more assistance on this.

    Thank you.