Support » Plugin: Participants Database » Search form options
4 years, 1 month ago
My results list have 4 columns, but I want to let people search just for one of these, not every 4 of them.
Is there a way to limit to one column in search form, but still present the results with 4 columns?
OK, this is how you do that. Create a custom template for your list by copying /participants-database/templates/pdb-list-default.php to wp-content/themes/YOUR_THEME/templates/pdb-list-default.php
In that file, you’ll find a line: $this->show_search_sort_form();
Replace that with this:
$temp = $this->display_columns;
$this->display_columns = array('first_name');
$this->display_columns = $temp;
Where it has array('first_name') put in the name of the fields you want your users to be able to search.