Posted by Dima
2016-03-12

Hello dear Tom. You write brilliant script, but i have some problem. I want that users see only "active" records, i do some changes in df.table-name.search file in "active" string like: .... array ('reg'=>'Y')... everything working only when users just log in, but when users go to next or previous page the script show all records "active" and "non-active". What i'm doing wrong? I even do some changes in RecordList file - add: ?sc_......&active=y (to page tab buttons), but if users change 'y' to 'n' they see all "non-active" records and thats very bad:(. This problem also when users click search button without inquires in all fields, when all search fields is empty. I can't understand, what i'm doing wrong. Please help me.

And another question. Can i do one field required in search menu? Thank you for fast reply.
Posted by Tom
2016-03-14

Hi, If you want permanently to set active to Yes, you can remove the following from web/staff/tpl.(table-name).search.inc.php
<?php echo $hm->Zb( 'sp:def:active' ); ?>
and put this instead:
<input type="hidden" name="sp:def:active" value="Y"/>

>Can i do one field required in search menu?
There isn't a turn key solution. I were you, I would write javascript to detect an empty field and cancelling posting the form.