Darryl,
you can edit
getCtrlSearchTypeOptions() function in the generated classes\searchcontrol.php file for this purpose.
Unfortunately we don't have a ready to go solution for this.
Hello Ann,
Thanks, I missed that file, <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=51923&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />
I've edited searchcontrol.php to give the required output,
As the searchtype is attached to the fields in a loop I have edited script to look for common options and depending on the options set, used ' if or else' to rewrite the output with a style class to hide the unrequired boxes.
The next task is to set the required layout...........
The advanced search panel on the list page with 5.2 is a big plus with current projects as its less work than with 5.1 when having to code the advanced search page into the list page.
Is the next version of phprunner going to have a more configurable searchpanel with regards to the options and layout?
Da.
..........................................................................................
example tested ok in a several browsers.
..........................................................................................
remove unrequired options boxes #####
$option ='<OPTION VALUE="Equals" >Equals</option><OPTION VALUE="NOT Equals" >Doesn\'t equal</option>';
$option2='<OPTION VALUE="Equals" selected>Equals</option><OPTION VALUE="NOT Equals" >Doesn\'t equal</option>';
$status=$option;
$status2=$option2;
$box='';
if ($this->getCtrlSearchTypeOptions($fName, $selOpt, $not)==$status)
{
$box='yes';
}
if ($this->getCtrlSearchTypeOptions($fName, $selOpt, $not)==$status2)
{
$box='yes';
}
if ($box=='yes')
{
$searchtype = '<SELECT id="'.$this->getSearchOptionId($fName, $recId).'" NAME="'.$this->getSearchOptionId($fName, $recId).'" SIZE=1 onchange="'.$selectOnChange.'" '.($renderHidden || !$this->getSrchPanelAttr['ctrlTypeComboStatus'] ? 'class="nobox"' : '').'>';
$searchtype .= $this->getCtrlSearchTypeOptions($fName, $selOpt, $not);
$searchtype .= "</SELECT>";
}
endof remove unrequired options boxes #####
continue with required options boxes #####
else
{
$searchtype = '<SELECT id="'.$this->getSearchOptionId($fName, $recId).'" NAME="'.$this->getSearchOptionId($fName, $recId).'" SIZE=1 onchange="'.$selectOnChange.'" '.($renderHidden || !$this->getSrchPanelAttrs['ctrlTypeComboStatus'] ? 'style="display: none;"' : '').'>';
$searchtype .= $this->getCtrlSearchTypeOptions($fName, $selOpt, $not);
$searchtype .= "</SELECT>";
}
return $searchtype;
}
endof continue with required options boxes #####
...........................................................................................
style class added to search_panel.htm
.nobox {
width: 0px;
overflow: hidden;
display: none;
visibility: hidden;
}
...........................................................................................
Note: Checking for selected'Doesn't equal' was not required as the selection will always Equals.