Jump to content

Calendar form filler


bullbreed

Recommended Posts

HI everyone.

 

PHP newbie here. I've been learning php for a couple of weeks now and I love it. My websites can now do things that they have never been able to do. woohoo. Thanks for all your help guys.

 

I would like to develop a calendar that when clicked inserts that date into a form field.

Has anyone any idea where to start.

 

Basically the user fills in a form with his name and address, then clicks on a calendar date to let me know when he is available to attend my office.

 

The calendar can be just sat on the page but when the date is selected it fills in the form field so when he submits the form th date and other info goes to the database.

 

I could look on hot-scripts and the like but I'm enjoying learning it so much that perhaps a little help would improve my php skills.

 

Thanks in advance.

 

Bullbreed

Link to comment
https://forums.phpfreaks.com/topic/189442-calendar-form-filler/
Share on other sites

Sounds like you need something like Javascript for this. I would have a table or a set of div's for each day, then I would observe each cell/div in javascript for a click, and fire a function when it's clicked to update the form to hold that date. Look into JS frameworks like jQuery (most popular) and prototype (imo the best) for more info. This is the prototype page that would help you:

 

http://api.prototypejs.org/dom/event.html#observe-class_method

Link to comment
https://forums.phpfreaks.com/topic/189442-calendar-form-filler/#findComment-999972
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.