-
SuperDiveAsked on January 3, 2022 at 5:01 PM
Hi,
In my form, I have a date calculation based on which ticket the user purchases (widget). I would like to also insert the time here, so I can integrate my form with Google Calendar.
The sessions are 8:00 - 9:30 PM.
Unfortunately, your Google calendar integration only allows me to choose up to 60 minutes duration, otherwise I have to input the value based on my form. When I try to use a form field by adding a Time field to the Date Picker, I cannot properly calculate this (it defaults to 7:00PM every time).
Please help?
-
David JotForm Support ManagerReplied on January 3, 2022 at 10:12 PM
Thank you for reaching out to us. Unfortunately, you cannot insert a Time field value in a Date Picker field through conditions.
I would suggest you to use the Appointment field instead. It would integrate correctly with Google Calendar:
So the time will show up, example:
You can give your own duration to this field, and set the Intervals:
And you can define the dates it should be available:
To set up a max number of people that can book the same time-slot, you can go to Advance settings to specify that:
Let us know if you have more questions.
-
SuperDiveReplied on January 4, 2022 at 11:50 AM
If I use the appointment picker, is it still somehow possible to show people how many spots are left that day? That's why I liked the widget (it showed X spots remaining).
-
Lars JotForm SupportReplied on January 4, 2022 at 2:11 PM
Hello,
With a bit of adjustment to the conditions and an extra date field, I was able to accomplish this:
I added a Date Picker field for the end of the session, that we'll use in the integration, but they can both be hidden on the final form.
And as you notice on them in the screenshot, I enabled the Time Field in their properties:
Your current conditions, as seen below, were picking the wrong time during the day when the Time Field is enabled.
To get it to pick 8PM while in New York time zone, I had to add ".0417" to the amount.
And then had to do that for each one, and then the Session Date gets filled correctly with the time.
And when Session Date is filled, I add Session Date + 90 minutes (0.0625 days) to Session End.
And for the integration, I used the Session Date and Session End for the start and end time of the calendar event:
One problem with this is if users are in other time zones, it might select another hour. As we don't have the autocorrecting features of the Appointment Field. But if your customers are in your area, that shouldn't be a problem.
Please give this a try, and let us know if you run into any issues!
Best regards,
Lars