Problem
The advanced search had a lot of fields that I didn't want to display. I wanted to limit the options to make it more user friendly, so instead of showing over 40 options in the drop down menu, I just wanted a few key fields.
Solution
I copied application/views/scripts/items/advanced-search.php to my theme under the items folder. Then I added some javascript to beginning of this file. I blacklisted a lot of elements in the advanced search as detailed at http://groups.google.com/group/omeka-dev/browse_thread/thread/16ca2d476c532399/e5178def4f04c2a2?hl=en%29&lnk=gst&q=customize+advnaced+search#e5178def4f04c2a2. After noticing that the code in that link didn't work in IE9 and had formatting issues in Chrome, I found that .remove() works better than .hide(). Also I figured out how to block entire groups from showing instead of having to blacklist each element individually. After posting my code in the forums, John Flatness had some further refinements, and this is the final result.
<?php echo js('jquery'); ?> <script type="text/javascript" charset="utf-8"> jQuery(document).ready(function () { var blackListGroups = [ "Item Type Metadata", "Contribution Form" ]; var blackListElements = [ "Contributor", "Coverage", "Format", "Identifier", "Language", "Relation", "Rights", "Source", "Type" ]; jQuery.each(blackListGroups, function (index, value) { jQuery("#advanced-0-element_id optgroup[label='" + value + "']").remove(); }); jQuery.each(blackListElements, function (index, value) { jQuery("#advanced-0-element_id option[label='" + value + "']").remove(); }); }); </script>
Basically it prevents Item Type Metadata, and Contribution For fields from showing in the advanced search. It also blacklists individual elements as well. This makes it fairly easy to remove elements from displaying in the advanced search.