Support » Plugin: Participants Database » Search form modification
Search form modification
-
Hello!
Is it possible when i’ve got only one element in search form (eg. “private_id”), to somehow remove “show all” from dropdown menu, so my own element “private_id” will be selected as default?
I mean a situation, when the specific field will be default element in search dropdown menu.
-
Dunger,
You’ll need to use a custom template to do this. Read this page on how to set one up. You will be using “pdb-list-detailed.php” as your starting point. In that template are instructions for setting up your custom drop-down. You can even leave it out completely, replacing it with a hidden field of the same name with the field name as the value.
Thanks for your reply.
However, i found another way:i’ve edited PDb_List.class.php
and replaced:
$filter_columns = array($all_string => 'none') + Participants_Db::get_field_list('search', $columns, $sort);
with:
$filter_columns = Participants_Db::get_field_list('search', $columns, $sort);
And it’s working 🙂
Yes, but it’s best not to edit the core files. The templates allow you to make changes that won’t be lost when you update.
Unfortunately, i barely know html/php/css, so it’s nearly impossible to me to add new line of code 🙁 Of course your way looks even better for my purpose, but i am really green at coding.
When it’s possible, i am using templates, but this time it was way over my skills.
Thanks for help anyway 🙂I understand…. if you set aside a copy of your edited files, you can put your changes back in after upgrading.
- The topic ‘Search form modification’ is closed to new replies.