Forums

Include form with search parameter to limit result (filter)

ahannover 14 Nov, 2008
Hi
I have a general question that I'm unsure whether it's really a chronoconnectivity question or not but someone might be able to help.

I have a chronoconnectivity db connection which contains a log. Each log entry have a datetime stamp (when entry was submitted in chronoforms)
When I view the data in chronoconnectivity the default is to return all rows.
Is it possible to include a search field in a form in the result page which limit's results to a specific date or a date range.
Can anyone provide an example on how to do this.

E.g. from within the result page enter a start date and an optional end date and a submit button that will return only the entries with datetime= start date or optional the range start-date - end-date.

Anyone?
//Anders
Max_admin 14 Nov, 2008
Hi Andres,

you can add the search fields to the Header code and then use PHP in the WHERE code to do the search, example :

at the header :
<input type="text" name="startdate">


at the where:
<?php
if(JRequest::getVar('startdate')){
?>
WHERE date > <?php echo JRequest::getVar('startdate'); ?>
<?php
}
?>


Regards
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
kavaXtreme 24 Nov, 2008
Any way to do something like this in the Admin view?
Max_admin 25 Nov, 2008
not yet! I did it at some project but it needed some custom changes, didn't create a common method/solution for it!

Regards
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.