Hi,
thanks for your post, and sorry for the trouble.
For the first question, you could take a look at these suggestions:
https://wordpress.org/support/topic/search-from-another-page?replies=8
https://wordpress.org/support/topic/search-box-on-an-other-page-1?replies=5
https://wordpress.org/support/topic/tablepess-search-box-on-homepage?replies=9
Regarding the second question: Yes, search fields are table-specific, so that it’s not directly possible (that is without custom JS code that uses the API functions of the DataTables JS library) to have one field for multiple tables.
Regards,
Tobias
Thank you for the links – they solved exactly what I was looking for.
Additional Question: Is it possible to clear the search that was passed so that the visitor can use the search box on this page? OR is it better to hide this search box, then direct them to a new page?
Hi,
no problem, you are very welcome! 🙂 Good to hear that this helped!
I’m not aware of clearing that search field directly, sorry 🙁
Regards,
Tobias
Would there be a way to remove the search box from the filtered table? So that users can’t see it (but it is still visible on the main un-filtered table)?
Hi,
Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!
I might have an idea.
Regards,
Tobias
Test site is setup here: http://resequip.staging.haxxess.com/parts-search
I added a button “view entire parts list” to bring the user back to the entire (un-filtered) table.
Hi,
thanks!
On idea would be to not use the TablePress Row Filtering Extension for the filtering, but the TablePress Extension from https://tablepress.org/extensions/datatables-auto-filter/ (which basically uses the search field directly above the table).
To use that together with the search from on the home page, you’d just have to modify the tablepress-shortcode-filter-get-parameter.php file and replace the line
$attributes['filter'] = $filter_term;
with
$attributes['datatables_auto_filter'] = $filter_term;
To then clear the filtering, the user would just have to empty the search field.
Regards,
Tobias
That php code change works perfectly but I did NOT have to change the table short code to [table id=123 datatables_auto_filter=”word” /]
because it worked just as well for the plain [table_filter id=123 /] shortcode
Hi,
correct, the change of the Shortcode is not necessary, as that part is being done by the other Extension. Sorry for forgetting to mention that.
Best wishes,
Tobias
P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!