integration with a form

Help with installation and general calendar setttings

Re: integration with a form

Postby Wiciu87 » Tue May 15, 2012 2:30 pm

it workd for the two additional fields i created,
put it still doesn't work for the form below :/

ps. the form below is in an iFrame - does it change something ?
Wiciu87
 
Posts: 6
Joined: Mon May 14, 2012 10:38 pm

Re: integration with a form

Postby chris » Tue May 15, 2012 2:42 pm

Yes, presumably you will need to adjust the JavaScript code to look inside the other iFrame.
You will need to adjust these two lines so that they refer to the parent (main document) iframe with the form in it.
Code: Select all
var dateStart=parent.document.getElementById('dateStart');
   var dateEnd=parent.document.getElementById('dateEnd');


Chris
User avatar
chris
Site Admin
 
Posts: 1088
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: integration with a form

Postby Wiciu87 » Tue May 15, 2012 3:14 pm

yeah I get it but to be honest I have no idea how to do it, I have very little knowledge about js :/
I managed to get the calendar into the same frame as form but still nothing happens :/
Wiciu87
 
Posts: 6
Joined: Mon May 14, 2012 10:38 pm

Re: integration with a form

Postby chris » Tue May 15, 2012 8:22 pm

If you can get the form on the same page as the calendar itself then you can just modify these lines:
Code: Select all
var dateStart=parent.document.getElementById('dateStart');
   var dateEnd=parent.document.getElementById('dateEnd');

to these:
Code: Select all
var dateStart=document.id('dateStart');
   var dateEnd=document.id('dateEnd');


Getting one iFrame to talk to another is actually proving more difficult than I imagined.n

Chris
User avatar
chris
Site Admin
 
Posts: 1088
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: integration with a form

Postby peterr » Tue Jun 12, 2012 1:17 am

Hi Chris

Thanks for the calendar function. I have a question regarding this topic. Javascript isn't my strong point, and I'd like to add the following restrictions when selecting two dates (a start date and end date) like previous posts describe:
  • Not allow any fewer than x days to be selected
  • Not allow any selected date ranges to encompass booked dates

It would be great if guidance on these features would be given.

Thanks for your hard work
Peter
peterr
 
Posts: 1
Joined: Tue Jun 12, 2012 1:09 am

Re: integration with a form

Postby Zulu » Tue Mar 26, 2013 9:25 am

Hi,

I am planning on upgrading my site which is forcing me to upgrade the calendar too (i miss placed my old install script). When integrating with a form, the date now shows as "date_2013-03-26". I'm not sure why it is adding the "date_". My old calendar v3.03.03 does not. the new v3.03.07 does. Does anyone know the fix to remove the "date_" from the form integration? Or can I get a copy of the old V3.03.03 install script?

Thanks!
Zulu
 
Posts: 3
Joined: Thu Sep 01, 2011 4:28 pm

Previous

Return to Support

Who is online

Users browsing this forum: No registered users and 4 guests

cron