How far ahead would you prefer that people book? Should they be
making their reservations a month or more in advance? If so, what I
would do is set the arrival date for one month from today, and the
departure date for arrival + 1 week (or whatever you would prefer for
a length of stay).
The universal way to do this would be in PHP, since it would be
available to everyone. Otherwise, you could do it in JavaScript,
understanding that visitors who have disabled JS would not get this
enhancement.
Here’s the PHP method I would follow. I am only showing one picker,
you will need to do this for each element of the date (day, month,
year) but you can re-use the core function that builds the picker.
First, change your page’s filename from reservation.html to
reservation.php using the Inspector.
Now, add this code into the Before HEAD part of the Page > HTML
Markup dialog.
http://pastie.caboo.se/196175
That gets you a nice reusable function which will make a picking list
out of an array. It sets the default option according to the current
value of a global variable, so the next thing you need to do is set
up the array(s) and the current value.
http://pastie.caboo.se/196182
(add the above code to your first set of <?php ?> delimiters, so it’s
all in the same block)
What this does is set up your days picker using the preferred arrival
date of one month from today.
You would then set up additional pickers for the month and year,
using the same basic technique. (N.B.: You can’t use range() to
create your array of days, it only works for numbers or sequential
letters, so you would have to use array
(‘Sunday’,‘Monday’,‘Tuesday’,‘Wednesday’,‘Thursday’,‘Friday’,‘Saturday’)
instead.)
Have a look at the PHP manual for the proper syntax to use in the date
() function to create your initial values for month and year. Be sure
to use the correct format string to show just the segment you want to
display when setting the default value.
Now, to display each picker inside your page, you would use a Markup
Item instead of a Freeway-drawn picker.
Click inside the table cell where you want the picker to appear. From
the main menu, choose Insert>Markup Item. In the code window that
appears, enter <?=$arrive_day_picker?>
and okay the dialog. Preview
from your server, and you should see the current value of
$arrive_day_picker (a complete picking list of days, with the day one
month in the future selected) in place of this markup.
Repeat as needed for the other pickers, and you should be all set.
Walter
On May 13, 2008, at 12:11 PM, agaksel wrote:
http://www.sarigermetasev.com/reservation.html
I created this page with FWP and used sendmail function with a .php
processor
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options