WordPress.org

Ready to get started?Download WordPress

Forums

Participants Database
[resolved] Search form modification (6 posts)

  1. Dunger
    Member
    Posted 1 year ago #

    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.

    http://wordpress.org/extend/plugins/participants-database/

  2. xnau
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. Dunger
    Member
    Posted 1 year ago #

    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 :)

  4. xnau
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  5. Dunger
    Member
    Posted 1 year ago #

    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 :)

  6. xnau
    Member
    Plugin Author

    Posted 1 year ago #

    I understand.... if you set aside a copy of your edited files, you can put your changes back in after upgrading.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic