Forums

Connection Filter -> Form Filter

nzrunner 08 May, 2015
I have a Connection that has the ability to filter it by several fields. I have added an "Export to Excel" button that opens a linked Form. The Form has a Submit button with a DB Read and XLS Export action in On Submit section.

Everything works nicely, except ...

I would like any filter that is applied to the Connection, to be passed to the Form. At present, the Form exports every record in the table.

As an example, if I filter the Connection based on the year (e.g. 2015), I would like the DB Read in the form to be restricted to just 2015, meaning the export will only be for records where year=2015.

Any clues on how I can ensure that any filter applied on the Connection also gets applied in a Form's DB Read?
GreyHead 08 May, 2015
Hi nzrunner,

I think that you have to find a way to pass the filter information to the form. For example, if you add some custom code to the listing to save the filter variables to the Joomla! User session then you could read them back in the form and re-use them in the filter there.

Bob
This topic is locked and no more replies can be posted.