Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jippiejoo

    (@jippiejoo)

    I’ve just one column to search in, so I don’t want to have a dropdown for this.
    What I want is a drop down for the names in this one column.
    and hiding the first dropdown search colum:

    1.What I did is hiding the dropdown field:
    /www/wp-content/plugins/participants-database/classes > PDb_List.class.php

    $element = array(
    ‘type’ => ‘dropdown’,
    ‘type’ => ‘hidden’, <<<<<<<<<<<<< this I did.
    ‘name’ => ‘search_field’,
    ‘value’ => $this->filter[‘search_field’],
    ‘class’ => ‘search-item’,
    ‘options’ => array($all_string => ‘none’, ‘null_select’ => false) + $this->searchable_columns($columns),

    2.Then I specified the colum (cars) to search in:
    PDB-list detailed line 67:

    $this->column_selector(false, true, array (‘cars’), ‘column’ );

    3. And making a new dropdown for the search words in that one column:

    beginning with disable the old list:
    PDB-list detailed line 70:
    <?php /* $this->search_form() */?>

    and making the new dropdown:
    <input id=”participant_search_term” type=”hidden” name=”value” class=”search-item” value=’cars’>

    <select
    < name=”value”>
    option>-select-</option>
    <option> cars1</option>
    <option> cars2</option>
    <option> cars3</option>
    </select>
    <input name=”submit” type=”submit” value=”Search”>

    Hope somebody will be helped by this, because it took me hours and hours, because I’m a total newby.
    I like this plugin a lot so if anybody is helped by this… My pleasure!

    Thread Starter jippiejoo

    (@jippiejoo)

    So what I forgot to mention is that the above solution is working like a charm!
    Look at this: https://indutchables.nl/?page_id=220

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Search field dropdown’ is closed to new replies.