Conditional Logic: ability to display text in a condition.

  • AgilityAssoc.Canada
    Asked on November 30, 2017 at 10:42 AM

    Form 52745887899988, has two hidden fault text fields.

    They appear based on date field conflicts.

    1. Is it possible to have this "Fault" text in a condition rather then in a hidden field?

    2. Is there a better method of checking date conflicts then what I'm using?

        a) I was thinking of Dates Diff. widget being populated by dates entered in "Received date" and "Approved Date". and if negative number shows fault.

               (Received date should be earlier then Approved Date)

              (Trial Date should be be earlier then Post-Approved Date)

    Regards, Robert

  • Nik_C
    Replied on November 30, 2017 at 1:49 PM

    Hello Robert,

    I didn't get the 1st question: "1. Is it possible to have this "Fault" text in a condition rather then in a hidden field?"?

    If you could please shed some light on it?

    Regarding the second one, you could use before and after features of date field, so, for example, a condition like this:

    1512067634Screen Shot 2017 11 30 at 7 Screenshot 10

    Will show the error if date 1 is after date 2:

    1512067673Screen Shot 2017 11 30 at 7 Screenshot 21

    Here is my test form https://form.jotform.com/73334963151961 so you can check.

    We'll wait for your response.

    Thank you!

  • AgilityAssoc.Canada
    Replied on November 30, 2017 at 5:27 PM

    Hello,

    I had a hard time trying to explain (1), I can imagine it would difficult to read.

    So, first off, can a Condition have it's own text, and display it like this?; 

     IF Date 2 Before Date 1 ThisText "Date 2 Must be Later Then Date 1"   

    This text is part of the condition not a hidden field. Is this possible?


    As to 2... Is this using the widget?

    Thank you, Robert

  • David JotForm Support Manager
    Replied on November 30, 2017 at 8:21 PM

    1) No, it is not possible. Conditions can not display their own text.

    2) Unfortunately, the way you have set it up, is the only way to handle date conflicts.

  • AgilityAssoc.Canada
    Replied on December 1, 2017 at 8:38 AM

    OK,

    Having all that straightened out, and as to why I asked this question in the first place. I really don't like the way the date errors I have display, If a date error shows up it bumps the other fields up or down. A bit ugly. I was thinking I could wrap them in a div and use position absolute to show them anywhere I want without interfering with the other fields, would that work do you think?

    Thanks for all the help, Regards, Robert

  • AgilityAssoc.Canada
    Replied on December 1, 2017 at 9:47 AM

    OK,

    I have answered my own question, this indeed works. Problem resolved.

    Thank you Robert, Oh you are very welcome.

    Regards, Robert

    <div style="position: absolute; width: 250px; top: 10px; left: 30%; margin-left: -50px; padding: 10pt; background-color: #fef999; text-align: center; color: #307080; font-size: 13pt; font-weight: bold; border: 3px #ed2222 inset; border-radius: 8pt; z-index: 1;">

    Post Approved Date <br /><span style="color: black;">must be later than</span><br /> Trial Date</div>

     

  • David JotForm Support Manager
    Replied on December 1, 2017 at 9:51 AM

    Glad to know that you figured it out. Open a new thread if you need anything else, we will be glad to assist you.