<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
I am having trouble with vtlib and vtiger 6.3.<br>
<br>
I am trying to add a picklist field in the Leads module. <br>
<br>
All is well except no values are stored in the database nor table
inserted. Having tried three new instances of vtiger I am now
wondering if there has been an alteration in vtlib for 6.x. It
maybe something that I am missing. Has anyone had anything similar?<br>
<br>
My code is:<br>
<br>
<blockquote><?php<br>
<br>
include_once('vtlib/Vtiger/Module.php'); <br>
include_once('vtlib/Vtiger/Utils.php');<br>
<br>
$module = Vtiger_Module::getInstance('Leads'); <br>
<br>
$blockInstance = new vtiger_block();<br>
<br>
$blockInstance->label = 'LBL_TEST_PICKLIST';<br>
$module ->addBlock($blockInstance);<br>
<br>
$fieldInstance = new Vtiger_Field();<br>
$fieldInstance->name = 'test_picklist_field '; <br>
$fieldInstance->label = 'Test Picklist Field'; <br>
$fieldInstance->column = 'test_picklist_field';<br>
$fieldInstance->columntype = 'VARCHAR(50)';<br>
$fieldInstance-> table = $module->basetable;<br>
$fieldInstance->uitype = 16; <br>
$fieldInstance->typeofdata = 'V~O'; <br>
$blockInstance->addField($fieldInstance); <br>
echo "Added field <br />";<br>
$fieldInstance->setPicklistValues( Array ('Value1', 'Value2')
);<br>
<br>
Tia<br>
</blockquote>
</body>
</html>