PHP - set value of the field in the form.
Posted: Fri Jan 25, 2019 10:33 am
Hi,
With PHP I want to assign a value to one field/object on Edit form.
Type: Input / text (ID: cyk_number)
I try to use PHP BS (to assign value of the next autoincrement index)
Since long time can not get it working.
trying as well simple commands like
but as well can not change the field value.
Can you give some hints how to use PHP nuSetFormValue?
With PHP I want to assign a value to one field/object on Edit form.
Type: Input / text (ID: cyk_number)
I try to use PHP BS (to assign value of the next autoincrement index)
Code: Select all
$s = "SELECT AUTO_INCREMENT FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'CTbaza' AND TABLE_NAME = 'Taski_cykliczne'";
$t = nuRunQuery($s);
$r = db_fetch_object($t);
nuSetFormValue('cyk_number', $r->AUTO_INCREMENT);
trying as well simple commands like
Code: Select all
$r = "121";
nuSetFormValue('cyk_number', $r);
Can you give some hints how to use PHP nuSetFormValue?