J
|
Jane 7/28/2008 |
Hi, if (@$_REQUEST["a"]!="search" && @$_REQUEST["a"]!="advsearch") { header("Location: tablename_search.php"); exit(); }
// write search options $options=""; $options.="<OPTION VALUE=\"Between\" selected>"."Between"."</option>"; $searchtype = "<SELECT ID=\"SearchOption\" NAME=\"asearchopt_FieldName\" SIZE=1 onChange=\"return ShowHideControls();\">"; $searchtype .= $options; $searchtype .= "</SELECT>"; $smarty->assign("searchtype_FieldName",$searchtype);
|
T
|
thesofa author 7/28/2008 |
Hi, to redirect to the advanced search directly use following code in the List page: Before process event: To remove all search options (except Between) on the advanced search page use following code in the "Search Page: Before display" event on the Events tab: where FieldName is your actual field name.
|
T
|
thesofa author 7/28/2008 |
Thanks
$options="";
SELECT
|
J
|
Jane 7/29/2008 |
Field names are case sensitive here. $options=""; $options.="<OPTION VALUE=\"Between\" selected>"."Between"."</option>"; $searchtype = "<SELECT ID=\"SearchOption\" NAME=\"asearchoptDate Awarded\" SIZE=1 onChange=\"return ShowHideControls();\">"; $searchtype .= $options; $searchtype .= "</SELECT>"; $smarty->assign("searchtypeDate Awarded",$searchtype); |
T
|
thesofa author 7/29/2008 |
Field names are case sensitive here. I.e.
|
J
|
Jane 7/29/2008 |
This code works on my test box. |
T
|
thesofa author 7/29/2008 |
This code works on my test box. Try to debug it. For example open advanced search page on the Visual Editor tab, turn on HTML mode and compare smarty variables.
<TD class=fieldname>Date Awarded <input type="Hidden" name="asearchfield[]" value="Date Awarded"></TD>
|
J
|
Jane 7/29/2008 |
See correct variable name in Bold: <TD class=fieldname>Date Awarded <input type="Hidden" name="asearchfield[]" value="Date Awarded"></TD> <TD align=middle><INPUT type=checkbox name=not_Date_Awarded {$not_Date_Awarded}></TD> <TD>{$searchtype_Date_Awarded} </TD> <TD width=270>{build_edit_control field="Date Awarded" value=$value_Date_Awarded mode="search"}</TD> <TD width=270><SPAN id=second_Date_Awarded>{build_edit_control field="Date Awarded" second=true value=$value1_Date_Awarded mode="search"} </SPAN></TD></TR> <TR class=shade> |
T
|
thesofa author 7/29/2008 |
See correct variable name in Bold:
// write search options
|
T
|
thesofa author 8/1/2008 |
This works fine as described, BUT, if the result set occupies more than one page, when I click on the link to go to page 2, the page goes back to the advanced search page!!!! |
T
|
thesofa author 8/3/2008 |
OK, a change of tactic here, I still need to go to the advanced search page as soon as this report page is selected, |
J
|
Jane 8/4/2008 |
Hi, if (@$_REQUEST["a"]!="search" && @$_REQUEST["a"]!="advsearch" && !@$_SESSION["tablename_advsearch"]) { header("Location: tablename_search.php"); exit(); }
$_SESSION["tablename_advsearch"] = 1; |
T
|
thesofa author 8/4/2008 |
OK, That makes sense, and better named than I would have done. |
T
|
thesofa author 8/4/2008 |
Hi Parse error: parse error, unexpected T_BOOLEAN_AND in D:\htdocs\staff\betest\include\Behaviours_by_Tutor_Group_events.php on line 15
if (@$_REQUEST["a"]!="search" && @$_REQUEST["a"]!="advsearch")&& !@$_SESSION["Behaviours_by_Tutor_Group_advsearch"]
// Search page: Before process
|
J
|
Jane 8/4/2008 |
Hi, if (@$_REQUEST["a"]!="search" && @$_REQUEST["a"]!="advsearch")&& !@$_SESSION["Behaviours_by_Tutor_Group_advsearch"])
|
T
|
thesofa author 8/4/2008 |
Hi, you've forgot second ) bracket: You can empty $_SESSION["Behaviours_by_Tutor_Group_advsearch"] variable on the another reports for example.
|
J
|
Jane 8/4/2008 |
Hi, |