Identification



Welcome, Guest
Please Login or Register.    Lost Password?

use of $form->selectarray
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: use of $form->selectarray
#21248
use of $form->selectarray 8 Months, 2 Weeks ago Karma: 0
Hello,
I'am a beginner with Dolibarr,
I try to create a select in a form based on a array

Code:


$form=new Form($db);
$test=array(1 => "A",2 => "B");
print_r($test);
$form->selectarray('testselect',$test);



but nothing is displayed

a print_r(error_get_last());
give me

[type] => 8
[message] => Undefined property: stdClass::$MAIN_MENU_USE_JQUERY_LAYOUT
[file] => /var/www/clients/client2/web19/web/erp/dolibarr-3.2.0/htdocs/main.inc.php
[line] => 1510

somebody can help me, thanks by advance
p.baras
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#21249
Re:use of $form->selectarray 8 Months, 2 Weeks ago Karma: 0
ok
i am stupid, i just add echo and work fine
Code:


echo $form->selectarray('testselect',$test);



many thanks for your help.
p.baras
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1