The form takes the customer's details and sends them to a PHP form handler, that sends an email to me and then, allows the customer to choose to upload images or just pay for their game. A 'send a birthday game product' is not working at optimum capability if it doesn't include a field for the recipient's DOB. This would allow me to make sure the game is sent on the correct date!
I had originally asked the customer to write the date in the special instructions text area on PayPal. I would prefer to get this info, in the email with all the other order details though. With this in mind I researched adding a pop up calendar to the form page and thought that the YUI calendar was my best bet. I followed the simple instructions and lo and behold the calendar widget is working perfectly.
- The customer clicks in the birth date box and the pop up calendar displays
- They select a date
- the calendar closes
- The DOB is displayed in a dynamic text field
- they submit the form
- The form handler parses the data
- I receive the email with the appropriate details
- I make a Snappy Birthday game according to the details
- happy me :) happy customer :)
The other details on the page are checked and sent when the form is submitted and if I could get at the value in the dynamic div... I'm sure it would work...
Otherwise, the customer will just have to enter the date in an input text field...
which might be easier all round, if not so pretty.
I decided just to let the customer enter the date, I've saved the YUI version in case I ever find out how to implement it.
I'm thinking of attempting to write a game in Processing. This will be an experiment to begin with but if I manage it, I might try some more game applets...