Date Compare with validation error

  • Profile Image
    ajllopes
    Asked on September 04, 2019 at 09:57 AM

    Hi.

    I know that is possible in jotforms to compare dates using rules.

    For example in a identity document:

    If issue date > expiration date  

    I want to show a validation error because  issue date have to be < expiration date  

    It is possible ?

    Best regards,

  • Profile Image
    BJoanna
    Answered on September 04, 2019 at 10:50 AM

    You can use conditional logic to compare the date fields and show a custom warning message, using a text field if the issue date is after expiration.

    1567608389date.PNG

    How to Show or Hide Fields Base on User's Answer

    Here is a demo form - https://form.jotform.com/92464706814967

    Feel free to test it and clone it

  • Profile Image
    ajllopes
    Answered on September 04, 2019 at 11:07 AM

    Hi BJoana.

    Thanks for your help.

    I know that, but the validation rule it's a field.

    I dont want user have the possibility to go to the next page.

    This rule compares the two dates, but it only shows text. Does not force the validation.

    Another suggestion ?

    Best regards, 

  • Profile Image
    BJoanna
    Answered on September 04, 2019 at 11:20 AM

    If your form has a page break you can add additional DO state to hide it to the same condition.

    This will prevent the users to navigate to the next page before they fix the error. 

    1567610187date1.PNG

    I updated my form. Please test it again. 

  • Profile Image
    ajllopes
    Answered on September 04, 2019 at 11:43 AM

    Thanks BJoanna.

    It's an alternative solution!


    Best regards,

    António