Search field - after searching list display does not show all results

Reset a CF list display to show all items after a search.

Overview

The list retains the previous search parameter, so it only shows filtered results.
Add the search field parameter with an empty value to the list display link to clear the filter.

Answered
fa fasenderos 10 Feb, 2015
Hi,
I have followed this article to create a search field.

The search works fine and extracts the results as expected.
But after the search, when I navigate to the "List Display" it shows only the previously searched items not the complete list. To get the complete list I have to make a "Blank" search.

List Display Custom Header Code

<input type="text" name="srch" placeholder="search...." class="form-control A" />
<br>
<input type="submit" name="search" value="Submit" />


Settings:
Display Type = Custom
Searchable = Article.title, Category.title

Thanks in advance
Max_admin Max_admin 17 Feb, 2015
This is expected, the search term is still visible in the search text box, correct ?

If its then all good, you may add a button which resets and submits the form again to clear the search box and relist all items!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
fa fasenderos 17 Feb, 2015
Thanks for reply.
Yes, after some research I found that the reset button is the only solution, but is not really user friendly, so I decide to find make my custom search.
Max_admin Max_admin 17 Feb, 2015
Answer
1 Likes
Another easy solution would be to add the serch field parameter to the "list display" link:
link + &srch=


This will pass an empty srch string which means the list will be reset.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
fa fasenderos 18 Feb, 2015
+1
This is a smart solution, thanks for the tip
This topic is locked and no more replies can be posted.