This might be residual tryptophan talking, but here's one approach.
The file that needs to be overridden is application/view/scripts/items/search-form.php
. Copy that file into your theme's items
folder, so you have {yourtheme}/items/search-form.php
.
That dropdown is produced by this code around line 54 in the get_table_options()
call
echo $this->formSelect(
"advanced[$i][element_id]",
@$rows['element_id'],
array(
'title' => __("Search Field"),
'id' => null,
'class' => 'advanced-search-element'
),
get_table_options('Element', null, array(
'record_types' => array('Item', 'All'),
'sort' => 'alphaBySet')
)
);
The approach I'm thinking of is to build up what goes in there separately.
So, instead of that function call, build up a $searchElements variable.
echo $this->formSelect(
"advanced[$i][element_id]",
@$rows['element_id'],
array(
'title' => __("Search Field"),
'id' => null,
'class' => 'advanced-search-element'
),
$searchElements
);
To build up that $searchElements
variable, above the foreach loop pile on what you need, something like this:
$searchElements = array();
$titleElement = get_table_options('Element', null, array('element_set_name' => 'Dublin Core', 'element_name' => 'Title'));
$descriptionElement = get_table_options('Element', null, array('element_set_name' => 'Dublin Core', 'element_name' => 'Description'));
$searchElements += $titleElement + $descriptionElement;
That's not especially efficient in the multiple calls to the same function that looks stuff up, but seems to basically do the job.
Hope that helps