Hi,
I'm currently working on a form to make it easier for our clients to ask for the availability of hotel rooms. The client selects the hotels by ticking checkboxes and then adds data like arrival and departure date, number of rooms etc.
We have an internal test version up and running (http://www.persoonlijkrome.nl/hotels/ho … rheid.html). I still have some styling to do, but before I start with that I have 2 functional questions:
- is it possible to add a validation to the departure and arrival dates to make sure that clients can not enter a departure date that precedes the arrival date? I have searched the internet and there seem to be some javascripts that can do this, but I haven't found a reliable one yet.
- the hotels are listed per zone, per zone I have used a separate set of checkboxes. We want to make sure that clients check at least one box, but no more than, say, 5. I can set a required number per set of checkboxes, but cannot apply this to the 3 sets together. Is this correct? Is it possible to apply a maximum?
Thank you very much for your help.
Johan
I'm currently working on a form to make it easier for our clients to ask for the availability of hotel rooms. The client selects the hotels by ticking checkboxes and then adds data like arrival and departure date, number of rooms etc.
We have an internal test version up and running (http://www.persoonlijkrome.nl/hotels/ho … rheid.html). I still have some styling to do, but before I start with that I have 2 functional questions:
- is it possible to add a validation to the departure and arrival dates to make sure that clients can not enter a departure date that precedes the arrival date? I have searched the internet and there seem to be some javascripts that can do this, but I haven't found a reliable one yet.
- the hotels are listed per zone, per zone I have used a separate set of checkboxes. We want to make sure that clients check at least one box, but no more than, say, 5. I can set a required number per set of checkboxes, but cannot apply this to the 3 sets together. Is this correct? Is it possible to apply a maximum?
Thank you very much for your help.
Johan
To simplify the whole procedure you could let the hotel choice be on a standard html page with links to individual forms one per hotel. The forms would be easy to create with WFB.
Then the choice comes down to bookings and verification of dates. This will have to be done on submission. For this type of thing a script is required. WFB will handle the form ok.
Trouble with all type of forms is they are only designed to accept data not do anything with it. You could employ a programmer for that part or take a crash course in php, not too difficult. Plenty of forums and examples available. Maybe someone can offer a turnkey solution.
Trouble with programming you never seem to get much for your buck although often many hours go into the solution.
Then the choice comes down to bookings and verification of dates. This will have to be done on submission. For this type of thing a script is required. WFB will handle the form ok.
Trouble with all type of forms is they are only designed to accept data not do anything with it. You could employ a programmer for that part or take a crash course in php, not too difficult. Plenty of forums and examples available. Maybe someone can offer a turnkey solution.
Trouble with programming you never seem to get much for your buck although often many hours go into the solution.
The Guy from OZ
I hate leaving someone with nowhere to go. Added on to what I said above if you split the form structure as I said to simplify the process this part script will give the difference between two dates. There is more involved but once you understand this the rest is easy. I have indicated what is possible but as a form can be used for many reasons it is not possible to come up with one solution fits all.
There are many ways to check difference between dates. Normally you would convert to Unix Time
<?php
$date1 = "2007-03-24";
$date2 = "2009-06-26";
$diff = abs(strtotime($date2) - strtotime($date1));// Result will check correctness
$years = floor($diff / (365*60*60*24));
$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));
$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));
printf("%d years, %d months, %d days\n", $years, $months, $days);
<?
For instance redirect to the checking script and if wrong return to form.
You may need the assistance of a programmer. It is like when your car needs tuning, like mine at the moment who do you go to. Mine goes in the shop Monday.
There are many ways to check difference between dates. Normally you would convert to Unix Time
<?php
$date1 = "2007-03-24";
$date2 = "2009-06-26";
$diff = abs(strtotime($date2) - strtotime($date1));// Result will check correctness
$years = floor($diff / (365*60*60*24));
$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));
$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));
printf("%d years, %d months, %d days\n", $years, $months, $days);
<?
For instance redirect to the checking script and if wrong return to form.
You may need the assistance of a programmer. It is like when your car needs tuning, like mine at the moment who do you go to. Mine goes in the shop Monday.
The Guy from OZ
Prism,
Thank you for your response. Good luck with your car
Thank you for your response. Good luck with your car

So what tack are you taking to solve your problem. My car is running smooth, Air cleaner and throttle body cleaned and one sensor and fuel throttle valve replaced.
I am interested on the outcomes of these questions as all we can do is offer some advice not always on the money as there can be many options available. Personally I would take the path of least resistance. What is smooth for the developer is smooth for the user.
My approach would be, let a person choose a district then a hotel then number of people time etc. the page they reach already tells you most of the requirement. Then there is only one check to make. Is the dates entered correctly.
As I said I would be very interested in your solution. The answer is not important it is how you ask the question.
I am interested on the outcomes of these questions as all we can do is offer some advice not always on the money as there can be many options available. Personally I would take the path of least resistance. What is smooth for the developer is smooth for the user.
My approach would be, let a person choose a district then a hotel then number of people time etc. the page they reach already tells you most of the requirement. Then there is only one check to make. Is the dates entered correctly.
As I said I would be very interested in your solution. The answer is not important it is how you ask the question.
The Guy from OZ
I have listened to your advice but have first tried to find a solution leavng the actual structure of the form intact. I have found 2 javascripts that can verify the number of boxes checked. Both seem to be able to job the job, even when using more than one set of checkboxes. However, to make that work I had to give all sets the same name (eg "hotels") which resulted the form's built-in scrpts no longer functioning correctly.
I then created another form with only one set of checkboxes. Here all scripts work fine, but I haven't yet found a solution to adjust the layout of the form into the 3 districts. I have tried to add text fields directly in the html, but the result isn't stable.
I'm now thinking about your suggestion to make our clients first select a district and as a second step a hotel. Problem here is that clients commonly compare hotels from more than one district, so making them select a district first seems to limit their options. Second I would then like to form to be more interactive meaning that the option would have to open after the client has selected a district.
I decided to let it rest for a few days and wait for some inspiration...
I then created another form with only one set of checkboxes. Here all scripts work fine, but I haven't yet found a solution to adjust the layout of the form into the 3 districts. I have tried to add text fields directly in the html, but the result isn't stable.
I'm now thinking about your suggestion to make our clients first select a district and as a second step a hotel. Problem here is that clients commonly compare hotels from more than one district, so making them select a district first seems to limit their options. Second I would then like to form to be more interactive meaning that the option would have to open after the client has selected a district.
I decided to let it rest for a few days and wait for some inspiration...
Interesting Post!
A checkbox basically returns a true/false state (ischecked) or (not ischecked). I am a newbie, but the WFB only sends the form data entered to a database/email/cvs/attachment. The constraints (ischecked or not ischecked) is processed by the backend.
I am trying to figure out how, within WFB, how you could keep the client on your page if their first options (date, hotel, etc) are false. I understand you can send hidden fields in WFB to a database/email etc, but what happens after they press the submit button?
Like airline reservations, how do you tell the client there is no availability and to try again?
Once again, newbie at Web stuff.
A checkbox basically returns a true/false state (ischecked) or (not ischecked). I am a newbie, but the WFB only sends the form data entered to a database/email/cvs/attachment. The constraints (ischecked or not ischecked) is processed by the backend.
I am trying to figure out how, within WFB, how you could keep the client on your page if their first options (date, hotel, etc) are false. I understand you can send hidden fields in WFB to a database/email etc, but what happens after they press the submit button?
Like airline reservations, how do you tell the client there is no availability and to try again?
Once again, newbie at Web stuff.
You said that clients would like to first compare hotels and districts. for this pages and links could suffice. If you write down the logic as to what you want, you will probably find you can get the potential client to make most of the decisions as they browse the site .
I do not know enough about the industry but can only put myself in the place of a potential customer. and consider If I were contemplating a holiday what would I look for if I went to a site. I would think district first then see what is available in accommodation then if the accommodation did not stack up I would like to be steered to another location and drill down again.
I program so I think in logical progression. Based on industry knowledge that should give you the path a customer would probably take, so, give them that path. A form is only needed to get their contact information where you close the deal. The site is only the advertisement, hmm! the bait.
Looking at your question again I think you are putting to much emphasis on a form doing it all for you. Pages and links are decision makers and as WFB is so easy to use, does it matter how many actual forms the site does have.
I would use a large sheet and spread out all the decision paths each leading to a form to finalise the info you get. Roughly:- District - Hotel - Room - Form - Check That is how I see the exercise.
It looks like a project for me for the future. Since your post I looked at a lot sites and was not impressed.
a path taken should be an enjoyable experience especially if it is about holidays.
Anyway food for thought. I have always found that if I can visualise a solution it quickly become a reality
I do not know enough about the industry but can only put myself in the place of a potential customer. and consider If I were contemplating a holiday what would I look for if I went to a site. I would think district first then see what is available in accommodation then if the accommodation did not stack up I would like to be steered to another location and drill down again.
I program so I think in logical progression. Based on industry knowledge that should give you the path a customer would probably take, so, give them that path. A form is only needed to get their contact information where you close the deal. The site is only the advertisement, hmm! the bait.
Looking at your question again I think you are putting to much emphasis on a form doing it all for you. Pages and links are decision makers and as WFB is so easy to use, does it matter how many actual forms the site does have.
I would use a large sheet and spread out all the decision paths each leading to a form to finalise the info you get. Roughly:- District - Hotel - Room - Form - Check That is how I see the exercise.
It looks like a project for me for the future. Since your post I looked at a lot sites and was not impressed.
a path taken should be an enjoyable experience especially if it is about holidays.
Anyway food for thought. I have always found that if I can visualise a solution it quickly become a reality
The Guy from OZ
Hi Harold you are right a form has a limit to the decision process it can deliver. What I propose is to incorporate pages and links into that process. Images, video clips of districts links to hotels with descriptions video images of rooms etc and so it goes on. a matrix of links finishing with a decision that can be entered in a form. Ultimately the responder will finalise the deal maybe even changing the venue whatever.
As I said above advertising is all a site is about and the deal is to bring in customers. The more a site gives the more it receives. This forum and service is an example of a site that is using all at it's disposal to keep happy customers and it works. It has me:D
As I said above advertising is all a site is about and the deal is to bring in customers. The more a site gives the more it receives. This forum and service is an example of a site that is using all at it's disposal to keep happy customers and it works. It has me:D
The Guy from OZ
I agree with your observations. Actually I already started to make a sort of flow diagram myself. Having said that, I'm afraid that not all clients think as structered as you seem to do....

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.