I am modifying my collections/show file to incorporate search functionality for each collection, which I have working fine for keyword search. However, I'd like to include the ability to "Narrow by Specific Fields" in the same manner that the Advanced Search functions, but only displaying in the dropdown menu the fields that are included within that collection, or alternatively only fields within a specific item type, rather all possible fields.
It looks like the following code generates the dropdown menu :
get_table_options('Element', null, array('record_types' =? array('Item', 'All'), 'sort' => 'orderBySet')
How can I modify this to only include the relevant fields for the collection? Any suggestions or guidance would be appreciated.