This topic is locked

How to get rid of search panel criteria fields

9/14/2010 11:10:12 AM
PHPRunner Tips and Tricks
F
FunkDaddy author

I emailed Sergey requesting some help with the following question:
"How can I get rid of certain items in the search panel?"
Specifically I want to get rid of:

  1. The criteria radio button fields/section (where we see "all" and "any")

  2. The "Add field" and "Show Options" links
    I'm posting the response here to help fellow developers:

  1. to get rid of the conditions block open 'Search page:Before display' event on the Events tab and put the code:



$xt->assign("conditions_block",false);


2) open generated \output\templates\TableName_search_panel.htm file and delete the following lines:



<div id="srchCritTop{$id}" class="critCont" style="display: none;">

{mlang_message SEARCH_CRITERIA}:&nbsp;

<input type="radio" name="srchType" {$all_checkbox}>{BEGIN all_checkbox_label}{mlang_message SEARCH_ALL}{END all_checkbox_label}

&nbsp;&nbsp;&nbsp;

<input type="radio" name="srchType" {$any_checkbox}>{BEGIN any_checkbox_label}{mlang_message SEARCH_ANY}{END any_checkbox_label}

</div>



<div id="addOption{$id}" class="addOption">

<a id="showHideControlChooseMenu{$id}" class="tablelinkssearch" {$showHideCtrls_attrs}>{mlang_message SEARCH_ADD_FIELD}</a>&nbsp;&nbsp;&nbsp;

<a id="showHideSearchType{$id}" class="tablelinkssearch" {$showHideCtrlsOpt_attrs}>{$showHideOpt_mess}</a>

</div>


And in case you guys are wondering how to get rid of the pesky close/delete red button that is attached to each field criteria you should read this post:
http://www.asprunner.com/forums/topic/15093-how-to-turn-of-advanced-search-panel-close-field-option/pagep52199hlsearchfromsearch1&#entry52199
Cheers,