Hub
|
Posted: 02/04/2002, 8:04 AM |
|
I am trying to hide forms that return a "no records" response.
Here the code that I put in the Open event of the form:
if (ArticleExtSourceNoRecords == true) {
$tpl->set_var("FormArticleExtSource", "");
return;
}
The result is that this form is never displayed on the screen!
What am I doing wrong? I am using PHP and templates.
Thanks!
|
|
|
CodeCharge Support
|
Posted: 02/05/2002, 1:09 AM |
|
Hub,
try to use the following code in form Open event
$sSQLtmp = $sSQL. $sWhere. $sOrder;
$db->query($sSQLtmp);
$next_record = $db->next_record();
if((!$next_record)|| (!$bReq))
{
$tpl->set_var(FormForm_Name, "");
return;
}
|
|
|
|