Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.