I am trying to create a module to book services during given business hours. I want the user to enter a date, click a button to generate the available timeslots for that day, then confirm the appointment. In order to have the timeslot generation without relying on jquery/javascript, I needed to implement it as a multi-step form. This is my first attempt at multi-step forms so my knowledge is spotty. I'm having issues carrying over the date values from step to step. It seems like the timezone offset is being applied. I'm also attempting to hide both time fields and the To date field, but with them being hidden, I have to assign those 3 values in my submit function and thats not working well either. I've searched for a solution and theres a lot on multi-step forms, but really very little in conjunction with date module fields. I could achieve what I want without them or using rules, but I'd like to be able to create a calendar view and have the module be mostly self serving. Any light you could shed would be appreciated.

Comments

mark.rowe’s picture

Alright, well most of the above no longer applies. I started over and recoded things and all works much better now. My only hang up now populating the date field based on the timeslot the user selects. I've editing the field values in the $form variable in both form_alter and form_submit which has no effect. I've also tried changing the values in $form_state on submit in the same GMT format, but stores the date as 12/31/1969 so that is also failing. I'm not sure where in the process chain to change the values in order for them to save properly. Sorry if I've changed the topic from what was in the original post.

DamienMcKenna’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

We're sorry but the D6 release of Date module is no longer being supported. You are encouraged to update to Drupal 7 or 8, or direct questions to Drupal Answers.