Hi all,
i´m using CC and have a search form with date field. Is there a possibility to use a date picker like the one in ChronoForms?
I tried to copy the code but the field was still a text field
maggie
i´m using CC and have a search form with date field. Is there a possibility to use a date picker like the one in ChronoForms?
I tried to copy the code but the field was still a text field
maggie
Hi maggie,
There's no datepicker 'built-in to ChronoConnectivity but you can probably use either the standard Joomla! calendar or the one that Max uses with ChronoForms. In either case you'll need to load the main calendar scripts and a short snippet to initialise the calendar.
Bob
There's no datepicker 'built-in to ChronoConnectivity but you can probably use either the standard Joomla! calendar or the one that Max uses with ChronoForms. In either case you'll need to load the main calendar scripts and a short snippet to initialise the calendar.
Bob
Hi Bob,
thanks for your answer. Sorry for being a bit slow, but how can load the calendar script and what snippet do 1 need?
maggie
thanks for your answer. Sorry for being a bit slow, but how can load the calendar script and what snippet do 1 need?
maggie
Hi maggie,
In the Header box you need to include the following code to display a date picker in in your listing filters:
Bob
In the Header box you need to include the following code to display a date picker in in your listing filters:
<?php
$script = "
window.addEvent('domready', function() {
myCal_date_1 = new Calendar({ date_1: 'd/m/Y' },
{
classes: ['dashboard']
});
});
";
$doc =& JFactory::getDocument();
$doc->addScriptDeclaration($script);
$doc->addStyleSheet(JURI::base().'components/com_chronocontact/css/calendar2.css');
$doc->addScript(JURI::base().'components/com_chronocontact/js/calendar2.js');
?>
. . .
<input type="text" name="date_1" id="date_1" size="20" title="" >
This assumes that you already have ChronoForms v3 installed, if you don't then you'll need to upload the two calendar2 files to your site and correct the URLs shown here.Bob
Hi Bob,
thanks for your answer. I put the code in the header section, but it produced a blank page. I guess there is some kind of syntax error, but I couldn't find it.
Can you help?
maggie
thanks for your answer. I put the code in the header section, but it produced a blank page. I guess there is some kind of syntax error, but I couldn't find it.
Can you help?
maggie
Hi Bob,
I have now a text field, but no date picker. Is there anything else to do?
maggie
I have now a text field, but no date picker. Is there anything else to do?
maggie
Hi maggie,
There shouldn't be, provided that the input has id='date_1'.
Please post a link to the listing so I can take a quick look.
Bob
There shouldn't be, provided that the input has id='date_1'.
Please post a link to the listing so I can take a quick look.
Bob
Hi maggie,
It looks as though the problem is that the calendar script is loading before the MooTools library :-(
Please try adding JHTML::_('behavior.mootools'); at the beginning of the HTML in the Header box to see if that does the trick.
You also have some JQuery loading before the noConflict() line so that may also cause problems.
Bob
It looks as though the problem is that the calendar script is loading before the MooTools library :-(
Please try adding JHTML::_('behavior.mootools'); at the beginning of the HTML in the Header box to see if that does the trick.
You also have some JQuery loading before the noConflict() line so that may also cause problems.
Bob
Hi Bob,
that did it. Thanks a lot!
I will validate my chronoforms and chronoconnectivity copy, when the project moves to its "real" url
maggie
that did it. Thanks a lot!
I will validate my chronoforms and chronoconnectivity copy, when the project moves to its "real" url
maggie
I'm not exactly clear on where we should add the JHTML::_('behavior.mootools');
I tried putting it at the beginning of the Header but no luck. Is there any other code I might be missing?
I tried putting it at the beginning of the Header but no luck. Is there any other code I might be missing?
Hi iwsassy,
Normally you don't need to add it anywhere because Joomla! or will load the MooTools library in most cases. If you do need it then the the beginning of the Header box is good - it needs to be inside PHP tags
Bob
Normally you don't need to add it anywhere because Joomla! or will load the MooTools library in most cases. If you do need it then the the beginning of the Header box is good - it needs to be inside PHP tags
<?php
JHTML::_('behavior.mootools');
?>
Bob
I'm not sure what I'm doing wrong. Is it possible to use CF to filter criteria for a CC report?
Here's the workflow I'd like to create:
Step 1:
A date is chosen from a date-picker. Records inputed by all users on that day is displayed and editable (probably in CC). As the data pops ups, so does a drop-down displaying registered user's names.
Step 2:
Select a user from the drop-down. Data is once again filtered based on the selected user which can then be edited or deleted.
I can't get around doing the steps in that order. Please help!
Here's the workflow I'd like to create:
Step 1:
A date is chosen from a date-picker. Records inputed by all users on that day is displayed and editable (probably in CC). As the data pops ups, so does a drop-down displaying registered user's names.
Step 2:
Select a user from the drop-down. Data is once again filtered based on the selected user which can then be edited or deleted.
I can't get around doing the steps in that order. Please help!
Hi iwdaddy,
Here's one possible answer.
Use a ChronoForms for the date dropdown and have it submit directly to the CC listing. Display the records for that date and add the user drop-down in the header - you can limit the entries in that to the users whos have work records for the selected day.
Include a link to return to the date-selector drop-down to pick another date.
Bob
Here's one possible answer.
Use a ChronoForms for the date dropdown and have it submit directly to the CC listing. Display the records for that date and add the user drop-down in the header - you can limit the entries in that to the users whos have work records for the selected day.
Include a link to return to the date-selector drop-down to pick another date.
Bob
Looking through the book, am I wanting to setup a form redirect and add an onsubmit code snippet like you described at the end of ch. 6?
That seems to be the closest example I could find based on your recommendation. Also, what could I have possibly done to cause my calendars (date pick) to no longer work on the front end. I just get am empty text box, though it works on the back-end wizard.
GreyHead, if you could help me out with these 2 functions, I got a keg with your name on it. Do I sound like a man with a deadline or what?
iwdaddy
That seems to be the closest example I could find based on your recommendation. Also, what could I have possibly done to cause my calendars (date pick) to no longer work on the front end. I just get am empty text box, though it works on the back-end wizard.
GreyHead, if you could help me out with these 2 functions, I got a keg with your name on it. Do I sound like a man with a deadline or what?
iwdaddy
This topic is locked and no more replies can be posted.