[Vtigercrm-developers] Vtlib API and Picklist

Prasad prasad at vtiger.com
Fri Aug 29 07:12:16 GMT 2014


Sachin,

I assume you renamed the picklist field after the creation. If yes, that
breaks the convention of fieldname vs picklist table so revert back.

We recommend to prefix modulename for picklist table as you did
"terminalstatus" assuming "terminal" to be your module. This will help in
creating unique picklist-tables across several module.

Regards,
Prasad

*Connect with us on: *Twitter <http://twitter.com/vtigercrm> *I* Facebook
<http://www.facebook.com/pages/vtiger/226866697333578?sk=wall> *I* Blog
<https://blogs.vtiger.com/>* I* Wiki
<http://wiki.vtiger.com/index.php/Main_Page> *I *Forums
<https://discussions.vtiger.com>*I* Website <https://www.vtiger.com/>


On Fri, Aug 29, 2014 at 8:07 AM, Sachin R <sachin.r0481 at yahoo.in> wrote:

> Hi,
>
> I have noticed a strange behavior in "vtlib" picklist API.
>
> For example the following code works fine.
>
>   $field3 = new Vtiger_Field();
>   $field3->name = 'terminalstatus';
>   $field3->label = 'Status';
>   $field3->column = $field3->name;
>   $field3->columntype = 'VARCHAR(50)';
>   $field3->typeofdata = 'V~M';
>   $field3->uitype = 15;
>   $block->addField($field3);
>
>   $field3->setPicklistValues(ARRAY('Active','Inactive'));
>
> if I rename the field as "status", the pick list is not populated in user
> interface.
>
> Regards,
>
> Sachin
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20140829/25886b4a/attachment-0001.html>


More information about the vtigercrm-developers mailing list