Page 5 of 5

Re: integration with a form

PostPosted: Tue May 15, 2012 2:30 pm
by Wiciu87
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 ?

Re: integration with a form

PostPosted: Tue May 15, 2012 2:42 pm
by chris
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

Re: integration with a form

PostPosted: Tue May 15, 2012 3:14 pm
by Wiciu87
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 :/

Re: integration with a form

PostPosted: Tue May 15, 2012 8:22 pm
by chris
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

Re: integration with a form

PostPosted: Tue Jun 12, 2012 1:17 am
by peterr
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

Re: integration with a form

PostPosted: Tue Mar 26, 2013 9:25 am
by Zulu
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!