Hi there,
I would like to customize the advanced search for Omeka. I need to allow users to only search by Title, Creator and Date instead of all the Dublin Core fields in 'Narrow by specific fields'
I have tried to modify this function the search-form.php
`echo $this->formSelect(
"advanced[$i][element_id]",
@$rows['element_id'],
array (),
get_table_options('Element', null, array(
'record_types' => array('Item','All'),
'sort' => 'alphaBySet'
)
)
);`
by
echo $this->formSelect(
"advanced[$i][element_id]",
@$rows['element_id'],
array(),
array(
'Dublin Core' => array(
'Title',
'Creator',
'Date',
),
)
);
I do have only Title, Creator and Date in the form but the search returns wrong results. So I decided to keep the get_table_options function and I tried this
echo $this->formSelect(
"advanced[$i][element_id]",
@$rows['element_id'],
array (),
get_table_options('Element', null, array(
'record_types' => array(
'Title',
'Creator',
'Date',
)
)
)
);
and also this
echo $this->formSelect(
"advanced[$i][element_id]",
@$rows['element_id'],
array (),
get_table_options('Element', null, array(
'record_types' => array('Item',array(
'Title',
'Creator',
'Date',
)),
'sort' => 'alphaBySet'
)
)
);
But both are not working correctly (I have a blank form).
Could someone let me know how could we modify this code to fit our need?
Thanks.