Posted by johgats
2016-06-07

Thanks for the good work.

how can i make some fields on the form mandatory and also reduce the search fields.
Posted by Tom
2016-06-08

Open web/codelib/asc/df.fl.(table-name).inc.php and find the field definition array.
For example, the following is the field definition array of the "first_name"
'first_name'=>array(
XA_CLASS=>'CVText',
XA_CAPTION=>RSTR_FIRST_NAME,
XA_REQUIRED=>false,
XA_SIZE=>24,
XA_MIN_CHAR=>0,
XA_MAX_CHAR=>36,
XA_SEARCH_OP=>'s%',
XA_LIST=>'(sp)(sr)(fd)',
),
To make the field mandatory, set XA_REQUIRED to true. The result should look like
'first_name'=>array(
XA_CLASS=>'CVText',
XA_CAPTION=>RSTR_FIRST_NAME,
XA_REQUIRED=>true,
XA_SIZE=>24,
XA_MIN_CHAR=>0,
XA_MAX_CHAR=>36,
XA_SEARCH_OP=>'s%',
XA_LIST=>'(sp)(sr)(fd)',
),
To remove a search creteria, please remove the search creteria input box from the template web/staff/tpl.(table-name).search.inc.php. A search criteria input box looks like
<?php echo $hm->Zb( 'sp:def:first_name' ); ?>