I'm setting up an appointment request form for an auto dealership. It works fine but I need some additional functionality. I've read this, which has some similar elements:
http://www.gravityhelp.com/forums/topic/email-based-on-day
Right now, the user picks the day they'd like for their appointment (using the date field), and then the time they wish to have their appointment (currently this is an hour field but I think I'll switch to a dropdown for the problem I have). The problem is that they are not limited to their time selection based on the hours of the service department. Here is what I need:
1. When the user chooses a date from the date picker, (I'll need to block certain dates (holidays and Sundays from appearing here - with jQuery or PHP I suppose, see item 2) I'd like to have some conditional logic that adjusts the hours in the dropdown field based on the day of the week (Monday, Tues, Thursday and Saturday are open 8am 6pm - Friday and Wednesday they're open from 10am to 9pm). The dropdown would be populated with 15 minuted increments between those hours (8:00, 8:15, 8:30, 8:45, 9:00... 5:30, 5:45, 6:00).
What's the best way of doing this? I know about the conditional logic in Gravity Forms, but it doesn't seem that you can create conditional logic based on a date. Should I be doing this with a php hook, or using Javascript? On their old, non Gravity Forms field I used javascript.
2. Also, is it possible to block dates in the datepicker on the PHP end, or can I only do this with jQuery? I'd like to set it up so only a certain number of appointments can be booked for each date. Ideally this would query the submitted form entries for the information.
Side note - it'd be great to be able to use more criteria for the conditional logic (and notification routing).