Appointment field: Conditions Not Working

  • Profile Image
    trhcux
    Asked on March 22, 2021 at 11:52 PM

    I need to show custom content above the appointment calendar when a Saturday is chosen.

    I made a test here:
    https://hipaa.jotform.com/210808919790061

    This is my condition:

    1616471465_605965a95337f_

    As you can see in the test, the content is not appearing, despite a aSaturday being chosen:

    1616471507_605965d3ea2b6_

    What am I doing wrong?

  • Profile Image
    Bojan_J
    Answered on March 23, 2021 at 06:50 AM

    Greetings.

    This is a new feature in the form builder, and it looks like it doesn't work as it should. I will forward the problem to our Developers, and as soon as we hear back from them, we will let you know.

    Thank you for your patience.

  • Profile Image
    trhcux
    Answered on March 23, 2021 at 07:14 AM

    OK, can you think of any other way around this?

  • Profile Image
    Bojan_J
    Answered on March 23, 2021 at 08:26 AM

    Currently, the only way around this is to add a calculation field to your form and to select the Appointment field in it. Make sure you click on the gray 0-9, so it becomes brown A-Z. This will return the selected date as a text:

    screenshot_4454.png

    Now, you can use the conditional logic to check if the calculation field contains Saturday, and if it does, show the field you need to:

    screenshot_4455.png

    You can right-click on the calculation field to hide it, so it doesn't confuse your users.

    I have cloned your form and modified it to apply this suggestion. You can test my form here:
    https://form.jotform.com/210813057739962

    You can click here to see how to clone this form to your account to see conditional logic.

    Note that you need to select the time to fill the calculation field and show the paragraph.

    Let us know if you have any additional questions.

  • Profile Image
    trhcux
    Answered on March 23, 2021 at 09:45 AM

    Update:

    This will not work. I need to present the message BEFORE a time is selected.

    I need the message to appear as soon as the user chooses Saturday - before the time is chosen.

    In the screenshot below, you can see that Saturday is chosen, but "Selected date" is not populated:

    1616507319_6059f1b710cce_

    It is not until a time is chosen that "Selected date" populates via the condition:

    1616507405_6059f20da67c2_


    I need to show the custom message BEFORE the user chooses a time.

  • Profile Image
    trhcux
    Answered on March 23, 2021 at 09:59 AM

    I will see if I can find a work around again.

    Background on larger problem:

    • We cannot use the default appointment calendar functionality because the timezone selection does not work when there is on calendar for the entire USA.
    • If a user is on the east coast, and tries to book an appointment for a pharmacy that is on the west coast, the appointment comes to the pharmacy in east coast time, rather than west coast time.
    • this creates error and confusion

    Our current work around:

    • I am displaying all times 0:00 to 23:30 so that 30 min appointments can be made
    • I am using CSS to show only times available for the given day
    • Hours for week days are between 9:00 AM and 4:00 PM
    • Hours for Saturdays days are between 9:00 AM and 1:00 PM
    • When the user chooses a Saturday, I will display the custom message, which in turn changes the parent <li> from display:none, to display:block
    • I can add some CSS that adjusts the CSS that shows/hides the available time slots by using an attribute selector, such as li#id_4 + li_#id_5 {…} and li#id_4[style="display:none"] + li_#id_5 {…}

    Since the custom content cannot be displayed UNTIL after a time is chosen, I may still be able to hide unavailable times, and treat the custom content that appears as an error message.

  • Profile Image
    trhcux
    Answered on March 23, 2021 at 10:15 AM

    I can see why my condition was not working - I had used 0-9 in the calculation, but you switched it to A-Z, which will work for Saturday.

    I am doing some more testing on my end, will have a new demo link soon.

    Thanks for the help so far.

  • Profile Image
    Bojan_J
    Answered on March 23, 2021 at 12:32 PM

    Greetings.

    This field has two parts: date and time. Until both are selected, the field is considered incomplete, and that is why it's not possible to trigger conditions with only the date selected.

    To resolve your problem with timezones, you could add a single choice field to your form, asking in what timezone they wish to make a selection, and then display one of two Appointment fields.

    Let us know if you have any additional questions.

  • Profile Image
    trhcux
    Answered on March 23, 2021 at 01:47 PM

    "To resolve your problem with timezones, you could add a single choice field to your form, asking in what timezone they wish to make a selection, and then display one of two Appointment fields."

    This will not work. I need the appointment calendar functionality, but I need the option to LOCK the timezone so that if a user chooses 3 PM, it automatically translates to 3 PM where the appointment is located.

    I am essentially hacking the appointment calendar with CSS to make it work.

    This is what we need:

    1616521654_605a29b70018c_timeZoneLock.pn

  • Profile Image
    trhcux
    Answered on March 23, 2021 at 05:15 PM

    UPDATE:

    I have a working demo now, using radio buttons for the user to choose week day vs week end, then based on some "shiv" LIs, I am using CSS to adjust what appointment times appear:

    https://hipaa.jotform.com/210808919790061

    Toggle between week day and weekend to see how it works - has to be 48 hours from today to book a time.

  • Profile Image
    ashwin_d
    Answered on March 24, 2021 at 01:00 AM

    I am glad to know that you figured it out all yourself.

    Do get back to us if you have any question and we will try to help you.

  • Profile Image
    janberk
    Answered on March 24, 2021 at 05:04 AM

    Hi, we're sorry for the inconvenience. It should be fixed now.

    If you have further issues please let us know.


  • Profile Image
    trhcux
    Answered on March 24, 2021 at 06:11 PM

    Still not working, demo here:
    https://hipaa.jotform.com/210826393590156


    1616623850_605bb8ea16537_1616623903_605bb91f55740_

  • Profile Image
    ashwin_d
    Answered on March 24, 2021 at 11:40 PM

    It seems the condition that you have added in your form is causing this issue. I have cloned your form, edited the condition, and it seems to work as expected. Please check the screenshot below:

    1616643522_605c05c2518d3_appointmentCOnd

    Please take a look at the following cloned form and see if it works as expected: https://form.jotform.com/210828564499974

    Feel free to clone this form for a closer look. The following guide should help you in form cloning: https://www.jotform.com/help/42-how-to-clone-an-existing-form-from-a-url

    Hope this helps.

    Do get back to us if you have any questions.

  • Profile Image
    trhcux
    Answered on March 25, 2021 at 08:17 AM

    The solution does not work in Safari. Only in Chrome - that is the problem. Whatever the engineers did is not compatible with Safari on macOS, from what I can tell from testing.
  • Profile Image
    trhcux
    Answered on March 25, 2021 at 08:19 AM

    Does not work for Safari on iOS either.

  • Profile Image
    Bojan_J
    Answered on March 25, 2021 at 09:40 AM

    Greetings.

    To properly address the problem, I will open a new ticket. We will reply soon at the following link:
    https://www.jotform.com/answers/2993198

    Thank you for your cooperation.