Hi,
Thirst: Great you guys re-injected live in facileforms!
There was a sample/tutorial in facile forms how to use the js calendar from joomla (1.0.x).
This used to be the code in 1.0.x:
Form Pieces
// include the javascript functions for dates
echo ('
<script language="JavaScript" src="{mossite}/includes/js/mambojavascript.js" type="text/javascript"></script>
<!-- import the calendar script -->
<script type="text/javascript" src="{mossite}/includes/js/calendar/calendar.js"></script>
<!-- import the language module -->
<script type="text/javascript" src="{mossite}/includes/js/calendar/lang/calendar-en.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="{mossite}/includes/js/calendar/calendar-mos.css" title="green" />
');
Submit Pieces
// Get the date entered
$startdate = '';
$enddate = '';
foreach ($this->submitdata as $data)
switch ($data[1]) {
case 'StartDate' : $startdate = date("Y-m-d",strtotime($data[4]));
break;
case 'EndDate' : $enddate = date("Y-m-d",strtotime($data[4]));
break;
default : break;
} // switch
// Pop-up the entered value to show it has been read
echo ('
<script language="JavaScript">alert ("'.$startdate.' to '.$enddate.'");</script>
')
Text field (catching date) value:
<?php return date("Y-d-m"); ?>
And the script of the button:
// When button clicked, call the javascript function to show the calendar
// and pass the value back to the input text field.
// NB: the value "StartDate" below must match the input text field name
function ff_SelectDate_action(element, action)
{
switch (action) {
case 'click':
return showCalendar(ff_getElementByName('StartDate').id, 'dd-mm-y');
break;
default:;
} // switch
} // ff_SelectDate_action
I thought I'd to change only the Form Pieces script into:
// include the javascript functions for dates
echo ('
<script language="JavaScript" src="{mossite}/includes/js/mambojavascript.js" type="text/javascript"></script>
<!-- import the calendar script -->
// this is the changed part:
<script type="text/javascript" src="{mossite}/includes/js/jscalendar-1.0/calendar-stripped.js"></script>
<!-- import the language module -->
<script type="text/javascript" src="{mossite}/includes/js/calendar/lang/calendar-en.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="{mossite}/includes/js/calendar/calendar-mos.css" title="green" />
');
But that won't help. Anybody any suggestions? I hope you'll understeand whta I mean, English isn't my native language.
Kind Regards,
Ruben
Original Form is downloadable @
www.esthervansanten.nl/downloads/verlofformulier.xml (Dutch). It works in J! 1.0.15