First listing should be empty

JvdStel 12 Apr, 2013
I have created a search/list/modify/delete function using CCv4 and CFv4. It uses the autolist feature in CC. When the screen opens and executes the list function, it shows the full table (or how many records I have set as default). Apparantly it executes a "select * from..." statement against the table. I would like the first appearance show an empty list, which only fills if I specify a search value. How can I do that?

Johan
GreyHead 13 Apr, 2013
Hi Johan,

You can fix this by using a WHERE clause that defaults to something like WHERE 1=2 if there is no search value set.

Bob
JvdStel 20 Apr, 2013
Thanks. I understand what you are trying to do. However, don't see what variable I could test and where I could place that code.
GreyHead 20 Apr, 2013
Hi Johan,

The code would go in the WHERE box of your listing.

Turn on the Debugger to see exactly what results are being used, that should help you identify the name of the search parameter.

Bob
JvdStel 20 Apr, 2013
I turned on the debugger and that gives me the generated SQL and returned data alright. It does not give me the search string the user may or may not have specified. What I want to test for is whether the user has given a search paramater and if not then return an empty list, or better, a message telling him to specify a search. My problem is I don't know how to read the search string based on the field names I have defined in the "Search Settings" tab under "Frontend List Settings". Is there some example code I could look at?

Johan
GreyHead 20 Apr, 2013
HI Johan,

Sorry, I'm no more knowledgeable about this that you are, I've taken a look at the FAQs listing here but that just shows everything if the search is empty :-(

Bob
Max_admin 23 Apr, 2013
Hi Johan,

Let's add this as a new feature to the new beta version, could you please contact me through the "Contact us" page, include a link to this topic, I will then send you the new version's installer so you can test it before I add this new feature.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.