Forums

List and Export

Mr Toast 25 Aug, 2011
Hi Bob,

Here's the scenario:

1) I have a registration form for customers, the enter the detail and it saves it all to the database.
The enter many things, basically - Program Code, Name, Telephone etc.

2) I then want a page where the owner can select the Program Code from a list and see all the saved registration information for that match.

3) Then they click Export and it downloads a the .csv file.

Step 1 is done and working well, Step 3 I know how to do

How do I do step 2??? I know it's not that hard but I can't work it out. So far I have a form that will load all the records into a table on the screen for me but I don't need all of them, just the filtered results. Is it possible to write this results to the csv file with ought creating a new DB record.

Cheers,
Brett.
GreyHead 25 Aug, 2011
Hi Mr Toast,

Step 2 sounds like a new form using the DB Multi-record loader to show a list of results (or a drop-down built from that list). There's a tutorial for the action in the download area I think.

You can link this to a third form displaying data only in a modal window to show the details of an individual record.

Bob
Mr Toast 25 Aug, 2011
Thanks Bob,

I have a form setup like this:

[attachment=0]screen-capture.png[/attachment]

At the moment for testing it's just an input box and a submit button that redirects to the thanks message and then it runs the multi form loader and it works, however I can don't know the code to get the WHERE statement to accept the {filter} variable from the input box... in much the same way you can insert data straight into text.

In the WHERE help text it says you can use PHP with Tags but I don't know how to write that piece of code, it must only be a few lines.

Let me know if that makes sense, if not... any chance I can have you look into the backend for me, I'm so close to having this done, but I'm stumped
Mr Toast 26 Aug, 2011
Following up...

I tried doing it like this (in the WHERE box) and it seems like it should work but there's no love!

code='<?php echo $detail['program_search']; ?>'
Max_admin 26 Aug, 2011
Hi Mr Toast,

What's your form's field name and what's your table column name ?

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Mr Toast 26 Aug, 2011
Hey the input field is called 'program_search' and the column I'm trying to filter is called 'code'
Mr Toast 26 Aug, 2011
did that make any sense at all?
Max_admin 26 Aug, 2011
Looks fine to me then, but I think this is related to your other post ? try to place a "debugger" after the "db record loader" action, it should display the SQL statement used to load the data and you can see if it has any defects.

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.