Hi,
I had to create a form with several JavaScript calendars in it and thought it might be useful if I could have a simple way of implementing them. The result is this ChronoForms Plugin for Joomla 1.5.
All the JavaScript it uses is already installed with Joomla 1.5 and so you need no extra files.
To use it with your form, select the Form in the Form Manager and click the Calendar PlugIn link. (To start with just click Save without changing the date format parameter.)
In your form html include the following function call

You may include several calendars in one form provided that they have different field names. All calendar results are returned in a single array $_POST['date_array'].
The calendar function can take more parameters thought these have default values that work in many cases:
Note: This is a beta version of the Plug In and may be buggy!! Please report any problems here.
To install, please use the extension installer in the Joomla admin. It will add a single file to your com_chronocontact/plugins folder. Once the installation is complete you can uninstall the extension.
Bob
[file name=com_cf_calendar_plugin.zip size=5059]http://www.chronoengine.com/images/fbfiles/files/com_cf_calendar_plugin.zip[/file]
I had to create a form with several JavaScript calendars in it and thought it might be useful if I could have a simple way of implementing them. The result is this ChronoForms Plugin for Joomla 1.5.
All the JavaScript it uses is already installed with Joomla 1.5 and so you need no extra files.
To use it with your form, select the Form in the Form Manager and click the Calendar PlugIn link. (To start with just click Save without changing the date format parameter.)
In your form html include the following function call
<?php calendar('name text', 'field_name'); ?>
and check the output in your form. You should have an input field with a button beside it, click the button to see the JavaScript calendar.
You may include several calendars in one form provided that they have different field names. All calendar results are returned in a single array $_POST['date_array'].
The calendar function can take more parameters thought these have default values that work in many cases:
<?php calendar('name text', 'field_name',
required=false, $id='field_name', value=""); ?>
Note: This is a beta version of the Plug In and may be buggy!! Please report any problems here.
To install, please use the extension installer in the Joomla admin. It will add a single file to your com_chronocontact/plugins folder. Once the installation is complete you can uninstall the extension.
Bob
[file name=com_cf_calendar_plugin.zip size=5059]http://www.chronoengine.com/images/fbfiles/files/com_cf_calendar_plugin.zip[/file]
Hi Greyhead, sounds good.
When i try to install it says i need to enable legacy mode. Is this correct? Does legacy slow down the site or does it only effect extensions that need it?
Also, isn't there a way to use a calendar included with joomla 1.5?
edit: got it working manually
When i try to install it says i need to enable legacy mode. Is this correct? Does legacy slow down the site or does it only effect extensions that need it?
Also, isn't there a way to use a calendar included with joomla 1.5?
edit: got it working manually
<td colspan='2'>
<?php JHTML::_('behavior.calendar'); ?>
<script type="text/javascript" src="includes/js/joomla.javascript.js">
</script>
<input class="inputbox" type="text" name="DOB" id='DOB'
size="25" maxlength="10" value="" />
<a href="#" onclick="return showCalendar('DOB',
'dd-mm-y');">Show Calendar</a>
</td>
Hi wizdum,
I'll check the legacy code question. I'd forgotten that I have it on. I tried to write an installer that will work with both versions of Joomla - not sure if that can be done without triggering the legacy message . . .
Your manual code does pretty much the same as the PlugIn though I didn't know about behaviour.calendar so yours is simpler (my version uses three more script loads). I'll go and try it out . . .
Bob
I'll check the legacy code question. I'd forgotten that I have it on. I tried to write an installer that will work with both versions of Joomla - not sure if that can be done without triggering the legacy message . . .
Your manual code does pretty much the same as the PlugIn though I didn't know about behaviour.calendar so yours is simpler (my version uses three more script loads). I'll go and try it out . . .
Bob
Hi to everyone,
I tried wizdum's solution with no luck...
Heres my code:
What's wrong here?
Do I have to put my form code into "Form JavaScript:" rather
than "Form HTML:"?? (Because it contains JS)?
Regards,
Horst
I tried wizdum's solution with no luck...
Heres my code:
<td colspan="4" nowrap="nowrap">
<?php JHTML::_('behavior.calendar'); ?>
<script type="text/javascript" src="includes/js/joomla.javascript.js">
</script>
<input class="inputbox" name="arrivalDate" type="text"
id="arrivalDate" size="18" maxlength="10" value="" />
<a href="#" onclick="return showCalendar('arrivalDate',
'dd-mm-y');">Zeige Kalendar</a>
</td>
But after date selection my input arrivalDate says: dd-mm-y (the format string) but not the selected date.
What's wrong here?
Do I have to put my form code into "Form JavaScript:" rather
than "Form HTML:"?? (Because it contains JS)?
Regards,
Horst
Yeah it looks like I was a bit hasty in claiming success. I get the same output as Horst.
Its probably the wrong thread to discuss this as the subject is GreyHead's plugin.
Heres what i found out:- see this thread
Horst: try '%d-%m-%Y'
Its probably the wrong thread to discuss this as the subject is GreyHead's plugin.
Heres what i found out:- see this thread
Horst: try '%d-%m-%Y'
Hi GreyHead,
any chance to have this plugin for joomla! 1.0.15?
By the way, great job you have done with Chronoforms!
Regards
Fred
any chance to have this plugin for joomla! 1.0.15?
By the way, great job you have done with Chronoforms!
Regards
Fred
Hi Fred,
Yes, I'll take a look, I think that there are only some minor changes to have this work for Joomla 1.0.x but I also want to build in some of the info that wizdum found.
Bob
Yes, I'll take a look, I think that there are only some minor changes to have this work for Joomla 1.0.x but I also want to build in some of the info that wizdum found.
Bob
I used the following PHP code:
This generates what seems to be the correct HTML inside the form:
However, there is no data being saved into the table even after adding a hidden input field ("<input name='Modified' type='hidden' />")
Would I have better luck with this plugin?
<?php
$date3 = JHTML::calendar( date("j M Y"), "Modified", "Modified", "%d %B %Y", "readonly=\"readonly\" size=\"16\"" );
echo $date3;
?>
This generates what seems to be the correct HTML inside the form:
<input type="text" size="16" readonly="readonly" value="3 Jul 2008" id="Modified" name="Modified"/>
However, there is no data being saved into the table even after adding a hidden input field ("<input name='Modified' type='hidden' />")
Would I have better luck with this plugin?
Hi kai920,
I have a couple of fields being readonly or hidden. No problem with that.
i.e:
or
From your form setting (within Chrono Forms - Form Manager > Your form name) , check the "Auto generated" tab. In the code, you should see something like:
If not, add it and it should be recorded.
Hope this helps.
Regards
I have a couple of fields being readonly or hidden. No problem with that.
i.e:
<input name="OrderDate" id="OrderDate" type="text" size="30" readonly="true" value="<?php echo strftime('%d/%m/%Y') ?>"/>
or
<input name="SubjectEmail" type="hidden" value="Demande de devis" />
From your form setting (within Chrono Forms - Form Manager > Your form name) , check the "Auto generated" tab. In the code, you should see something like:
'".mosGetParam($_POST,'Modified','')."' ,
If not, add it and it should be recorded.
Hope this helps.
Regards
shemzone wrote:
[/quote]
Hi Shemzone, thanks for your reply. I checked my two calendar fields which are submitting blank and they do indeed have the auto generated code:
'".JRequest::getVar('Published','', 'post', 'string', '' )."' , '".JRequest::getVar('Modified','', 'post', 'string', '' )."' ,
My other date field's data is caught by chronoforms properly (this field does not have a popup calendar)
'".mosGetParam($_POST,'Modified','')."' ,
[/quote]
Hi Shemzone, thanks for your reply. I checked my two calendar fields which are submitting blank and they do indeed have the auto generated code:
'".JRequest::getVar('Published','', 'post', 'string', '' )."' , '".JRequest::getVar('Modified','', 'post', 'string', '' )."' ,
My other date field's data is caught by chronoforms properly (this field does not have a popup calendar)
This plugin is just not working for me. Installs fine. Enabled legacy mode. Pasted in php code where I want the calendar to appear. Enable plug-in. But all I get is the form itself, no calendar, and none of the other HTML loads. Just a bare page with an un-styled form.
Do I click the Calendar Plugin checkbox in the Plugins section?
Do I disable legacy mode?
Do I click the Calendar Plugin checkbox in the Plugins section?
Do I disable legacy mode?
Hi randy,
Don't use the plugin with the latest releases of ChronoForms. Max has built the functionality into the core code.
If you are still using an old version and can't upgrade then I can give you some code that should work more simply tharn the plugin.
Bob
Don't use the plugin with the latest releases of ChronoForms. Max has built the functionality into the core code.
If you are still using an old version and can't upgrade then I can give you some code that should work more simply tharn the plugin.
Bob
This morning, I uninistalled ChronoForms 2.6 and installed 3.0. Everything looks fine. How do I install the popup calendars?
Hi randy,
Use the form wizard to create a new form and drag in the 'Date/Time Picker'.
I think you can cut and paste the corresponding code from the form html if you want to add it to an existing form.
Bob
Use the form wizard to create a new form and drag in the 'Date/Time Picker'.
I think you can cut and paste the corresponding code from the form html if you want to add it to an existing form.
Bob
Hi,
I installed CF V3.0 Stable with Joomla 1.5.
I set up a form with the wizard ... there is no tab with calendar plugin ... there is no button besides the input box in the frontend.
I couldn't find any calender...file in the plugin folder ...
What am I doing wrong?
many thx.m.
I installed CF V3.0 Stable with Joomla 1.5.
I set up a form with the wizard ... there is no tab with calendar plugin ... there is no button besides the input box in the frontend.
I couldn't find any calender...file in the plugin folder ...
What am I doing wrong?
many thx.m.
ok. thx. that is working.
but I don't see any calender button in the form in the browser ... just the input field.
if i click it nothing happensface-meh-blank
thx.m.
but I don't see any calender button in the form in the browser ... just the input field.
if i click it nothing happensface-meh-blank
thx.m.
Hi moreiter,
Works OK here - maybe you have a JavaScript conflict?
Bob
[attachment=0]10-10-2008 18-58-03.png[/attachment]
Works OK here - maybe you have a JavaScript conflict?
Bob
[attachment=0]10-10-2008 18-58-03.png[/attachment]
I'm having the exact same problem, but not being much of a coder, I don't know where to even begin to look. This particular Joomla site has very few additional extensions installed. I'm using the ja-purity template. Could this be at issue? Any suggestions on where to start looking?
Hi randy270,
My example form works Ok in ja-purity too.
Try looking at the site with FireBug and see if any errors show up when you click the calendar field.
Or you can switch to the default Joomla calendar field which isn't quite so pretty but works OK.
Bob
My example form works Ok in ja-purity too.
Try looking at the site with FireBug and see if any errors show up when you click the calendar field.
Or you can switch to the default Joomla calendar field which isn't quite so pretty but works OK.
Bob
It doesn't seem like the CSS file is loading. Could that have something to do with it? I mean, when I open the source, I don't see any link to the ChronoForms css files such as style1.css or calendar.css.
I have the Load Chronoforms CSS/JS Files? option set to Yes.
I have the Load Chronoforms CSS/JS Files? option set to Yes.
Hi randy,
if no CSS is there then there will be no JS too and no calendar will popup! do you have a link for me to look at ?
Cheers
Max
if no CSS is there then there will be no JS too and no calendar will popup! do you have a link for me to look at ?
Cheers
Max
Many thanks for your hits.
The simple solution: set the list "Load Chronoforms CSS/JS Files?" to YES ... 😶
greez.m.
The simple solution: set the list "Load Chronoforms CSS/JS Files?" to YES ... 😶
greez.m.
Max,
Can I send you the link privately? The site is on my work machine and I'd rather not broadcast the address.
Can I send you the link privately? The site is on my work machine and I'd rather not broadcast the address.
Hi randy270,
You can use the site contact form to contact Max or the email or PM buttons under his avatar.
Bob
You can use the site contact form to contact Max or the email or PM buttons under his avatar.
Bob
Sirs, I offer my humble apologies. It seems I neglected to install the new Mambot for V.3! Once I did that, the calendar appears. Very, very nice.
I also noticed that once you do install this Mambot, it prevents Joomla's default calendar system from appearing, at least in my forms. No problem.
Many thanks, and again, my apologies.
I also noticed that once you do install this Mambot, it prevents Joomla's default calendar system from appearing, at least in my forms. No problem.
Many thanks, and again, my apologies.
This topic is locked and no more replies can be posted.