'selected_appointment' and 'appointment duration' are hidden field of the previous page form (the one where the client chooses is appointment). Because we need to associate theses values to the client session i used this trick but i actually think that the best way would be to use cookies in the javascript in the previous page (linked theses values to the browser when the client select a preferred apppointment).
As for the behavior when form validation fails, can you show me an example ?