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?