Posted by Sergey
2017-10-11

Hello dear Tom. I want to "print" a text in textarea (in tpl.basename.detail.inc.php). I do like this <?php echo $hm->Zb('rs:def:hello_text',ZB_CBF,'getTextValue');?> but no result(( What am i doing wrong. Thank you.
Posted by Tom
2017-10-12

Did you already set up getTextValue? If not, Open web/staff/common.inc.php in a text editor, and put the following line on the top, then the function will be available anywhere inside the web/staff folder.
<?php function getTextValue( $key, $val ){ return isset($val->attri['value']) ? $val->attri['value'] : ""; } ?>
You can display the value of a field with the following code, assuming the name of the field is 'first_name'
<?php echo $hm->Zb('rs:def:first_name',ZB_CBF,'getTextValue'); ?>