Introduce validation to ensure the LATEST time is greater than EARLIEST time.

  • Profile Image
    ARCC123
    Asked on August 24, 2018 at 05:52 AM
    I would like to introduce validation to ensure the LATEST time is
    greater than EARLIEST time.
  • Profile Image
    roneet
    Answered on August 24, 2018 at 06:00 AM

    Which two dates in your form you want to validate?

    Is it the same form which you are referring to?

    https://jotform.com/81735840477364

    Please give us more details so that we could help you.

    Thanks.

  • Profile Image
    ARCC123
    Answered on August 24, 2018 at 06:43 AM
    Yes, I want to validate that Latest start time is later than Earliest
    start time
    ...
  • Profile Image
    roneet
    Answered on August 24, 2018 at 10:11 AM

    I have made a demo form based on your requirement. Feel free to test and clone it.

    1. Add Form calculation widget for Latest start time and Earliest start time calculation and make it hidden.

    15351194952.PNG

    15351195243.PNG

    2. Add HTML text element to show the validation error message.

    15351195724.PNG

    3. Add a Show/Hide condition that if Latest start time is less than Earliest time then show the validation error message.

    15351197661.PNG

    Let us know if this workaround helped!

    Thanks.


  • Profile Image
    ARCC123
    Answered on August 25, 2018 at 06:43 AM
    I have tried many times but I can not get this to work as required.
    The problem could be HTML text element which I added as text.
    I kindly ask that you make the correction to the form as I am unable to
    get it to work.
    Thanks/Andrew
    ...
  • Profile Image
    ARCC123
    Answered on August 25, 2018 at 06:43 AM
    I removed all my changes as I could not get the form to submit.
    Sorry but this too complicated for me. Much simpler for you to add the
    necessary validation than to support the multiple errors I get when I
    try making the changes.
    Thanks/Andrew
    ...
  • Profile Image
    roneet
    Answered on August 25, 2018 at 12:01 PM

    I apologize for the inconvenience caused to you.

    I have tested my cloned form that is with validation and form is submitting successfully. I'll suggest you make all the changes in a cloned version of your form and after you have tested it successfully you can make same changes in the Live version of your form so in this way live version won't be affected.

    I would request you to post here whatever issues you are facing. We are here to guide you.

    I'll once again repeat the entire process to add time validation.

    1.  Add Form calculation widget for Latest start time and Earliest start time calculation and make it hidden. Repeat the same process for Latest start time by adding the widget and adding a field to the widget. Don't forget to save.

    15352122231.PNG

    2. Add HTML text element to show the validation error message. Don't forget to save your text.

    15352125361.PNG


    3. Add a Show/Hide condition that if Latest start time is less than Earliest time then show the validation error message. I have added one more check that if latest time is less than the earliest time it will hide the submit button.

    15352128051.PNG

    Let us know if still, you are facing any issues while implementing the logic.

    Thanks.


  • Profile Image
    ARCC123
    Answered on August 26, 2018 at 12:43 AM
    Please understand I have so many versions of the form and none of them
    work. I have lost the validation to the zero value. I can not reinstate
    it to that point. There are endless versions and I can't seem to find
    the right version.
    I kindly ask you to do 1 thing - revert the form to how it was before I
    tried to do the latest changes. I have spent for ever and a day on
    trying to get this validation to work.
    Simpler for me to go back to how it was working "start of day Aug 25th"
    and then just forget about the earliest & latest time validation.
    It has turned into an absolute nightmare and I kindly ask to revert to
    the version that was supplied by Jotform.
    I only want a simple validation that latest time is greater than
    earliest time. If I can't get this to work simply and easily then I can
    live without it.
    Regards/Andrew
    ...
  • Profile Image
    Mike_G
    Answered on August 26, 2018 at 02:43 AM

    To revert to an earlier version of your form, you can use the Revision History Tool — How-to-View-Form-Revision-History

    But if, in any case, you decide to implement the validation again on your form, please let us know. We will be glad to make the necessary changes directly to your form with your permission.

  • Profile Image
    roneet
    Answered on August 26, 2018 at 02:56 AM

    Could you please check now that all your validation and changes in place?

    Let us know. We would be happy to help.

    Thanks.

  • Profile Image
    ARCC123
    Answered on August 26, 2018 at 03:43 AM
    Hi Mike,
    Kindly implement the validation directly on my form as I have tried 100
    times and each time not worked as required.
    Thanks/Andrew
    ...
  • Profile Image
    ARCC123
    Answered on August 26, 2018 at 03:43 AM
    It is not working. I can not complete the form. The message stays there
    even with valid times, and although I can go to 2nd page, there is no
    submit button.
    1.    The form should stay on the 1st page if there is an error on 1st page
    2.   The SUBMIT button should be shown on 2nd page if they entered an
    amount of greater than £0
    This is urgent problem as no one can submit the form now.
    Thanks/Andrew
    ...
  • Profile Image
    Adrian
    Answered on August 26, 2018 at 04:14 AM

    1. The form should stay on the 1st page if there is an error on 1st page

    I have checked your form and the form stays on the 1st page if there is an error on the 1st page. The HTML Text that you can show if the earliest time is greater than the latest time is not really an error message and it does not prevent the user to go to the next page.

    2. The SUBMIT button should be shown on 2nd page if they entered an 

    I have tested the form and the Submit button is showing when the total amount is greater than 0.

    15352712611.gif

    Let us know if you need further assistance.

  • Profile Image
    ARCC123
    Answered on August 26, 2018 at 04:43 AM
    3.    The form is not adding 3%. Previously a 3% fee was added for
    credit card payments.
    All today's bookings do not have 3% fee added. The last booking was
    received recently and does not have the 3% added.
    Regards/Andrew

    ...
  • Profile Image
    Adrian
    Answered on August 26, 2018 at 05:08 AM

    Since your last query is not related to this thread, I have moved it to a new thread to avoid confusion. It will be answered shortly there. https://www.jotform.com/answers/1563111


  • Profile Image
    ARCC123
    Answered on August 26, 2018 at 05:43 AM
    It should be showing an error message here, instead of allowing to go to
    2nd page:
    ...
  • Profile Image
    DonaldHag
    Answered on August 26, 2018 at 07:59 AM

    It should be showing an error message here, instead of allowing to go to 2nd page:

    This is the last response you posted. Unfortunately, it is not clear, please elaborate more on what error message is not showing.