How to conditional fill date field when slider value is equals to a certain value?

  • Profile Image
    Something123 
    Asked on June 13, 2019 at 09:02 AM

    Here is the form I am working on https://www.jotform.com/91611628597870.

    What I am trying to do is that based on the number chosen in the slider, it will fill the dates with that number of the past dates.

    For example, if the slider is set to 3, the 1st date should be filled with TODAY, the 2nd date should be filled with TODAY-1 and 3rd date should be filled with TODAY-2.

    All this should be done without the fields being visible. Only if the question "Would you like to customize the Duchs that you are filling out?" is set to "Yes", then one should be able to edit the dates.

    The form is integrated with google sheets. When the values are hidden, I am not getting the appropriate responses.

    Thank you very much for your help!

  • Profile Image
    Jed_C
    Answered on June 13, 2019 at 10:31 AM

    Please confirm if the information below is how you want the date picker field to be filled?

    Slider is equals to 1.

    1st date field should be equals to Today's date field?

     

    Slider is equals to 2.

    1st date field should be equals to Today's date field?

    2nd date field should be equals to Today's date field - 2 or today-2?

     

    Slider is equals to 3.

    1st date field should be equals to Today's date field?

    2nd date field should be equals to Today's date field - 2 or today-2?

    3rd date field should be equals to Today's date field - 3 or today-3?

     

    Is this correct? Actually, I already found a solution, but wanted to confirm if the workflow is correct. 

    Since the insert/update condition allows only one action, it will increment to match the value you have set in your slider.

    ex.

    1 value is equals to one condition

    2 value is equals to two condition

    3 value is equals to three condition

    and so on...

    Here's a sample condition:

    1560437038The Easiest Online Form Builde

    1560437331The Easiest Online Form Builde

    Sample output:

    1560437229The Easiest Online Form Builde

    You can view my cloned sample here https://form.jotform.com/91634045795969. Feel free to clone it so you can see how I applied the method mentioned in the screenshot sample.

    Looking forward for your response. 

  • Profile Image
    Something123 
    Answered on June 13, 2019 at 06:49 PM

    Yes, this is what I wanted, but if you never click the Yes button, it doesn't actually fill it out.

  • Profile Image
    BDAVID
    Answered on June 13, 2019 at 08:26 PM

    They are not filled out when the option called "Would you like to customise the Duchs that you are filling out?" is set to No, because the conditionally hidden field values are set to clear on submit. Please try changing this option to "Don't clear":

    1560471830don'tclear.png

    Let us know if you need more help.

  • Profile Image
    Something123 
    Answered on June 13, 2019 at 10:05 PM

    Yes, That's it.

    Thank you very much!