Linking to a form

Linking to a form

Postby coskungurel » Sat Aug 02, 2008 12:16 am

Hey Chris,

First of all, thanks for such a wonderful script and giving it out for free of charge.

I want to ask you a few questions and hope to get some guidelines. I want to implement your script into my father's logistics (they carry stuff from one place to another) company. I would like clients to click on a date they want to move their stuff and fill out a form and sent it for approval. I designed the form but could not figure out how to show the chosen date on the form automatically.

And another question is that, my father is able to perform two carrying in a day. So, after a client clicks, fills out the form and submit it, half of the day should be occupied. (Like A.M.) Clients also should not be able to revert their choices and should not be able to choose a second date. I looked through the code but could not find out how to do these. I am not good at coding but with some help I think I will do something useful...

By the way, I translated the script into my own language, Turkish. If you would like me to send it to you, or publish it somewhere. Please let me know.

Thanks for reading,
Looking forward to reading your answer, too...
Regards,
Cosh
coskungurel
 
Posts: 2
Joined: Sat Aug 02, 2008 12:03 am

Re: Linking to a form

Postby chris » Tue Aug 05, 2008 10:11 am

Hi there Cosh and welcome to the forum :)

As is, this script is not designed to do most of what you want, it would require quite a few changes to be able to fulfill your needs.
It's original purpose was, though not limited to, for showing availability.
I would like clients to click on a date they want to move their stuff and fill out a form and sent it for approval. I designed the form but could not figure out how to show the chosen date on the form automatically.

To do this you will need to modify the javascript function to add the date selected to the form.
You could achieve this by adding the following line to the ajax_mod_state() function in the "/js/update_cal.js" file (place it at the beginning of the function for example):
Code: Select all
document.getElementById('id_of_your_date_field').value=the_date;

where id_of_your_date_field is the id of your date field :)

So, after a client clicks, fills out the form and submit it, half of the day should be occupied. (Like A.M.) Clients also should not be able to revert their choices and should not be able to choose a second date. I looked through the code but could not find out how to do these. I am not good at coding but with some help I think I will do something useful...

You can disabled the calendar date links by changing the last value in the draw_cal() function (it sends 5 values) to "0" instead of 1.
So once you have submitted the form, you could create a php session variable and use that to check whether or not to show the date links.

I hope that helps,
Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: Linking to a form

Postby coskungurel » Tue Aug 05, 2008 10:19 am

Thanks Chris,
I am working on it. I will let you know when I do something useful :)
coskungurel
 
Posts: 2
Joined: Sat Aug 02, 2008 12:03 am


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron