[Vtigercrm-developers] Custom UI Type?

Tim Mohrbach preexo at googlemail.com
Fri May 6 13:23:28 GMT 2016


If I’m not completely wrong… No, there is no clean way, you will have to get your fingers dirty a little. 
The restriction that extensions can’t copy any files into other directories than their own extension directory is a very good one and makes sense.
Still I have struggled quite often with this limitation too. I have actually thought about it before… Uitypes should be able to be added via an extension. The vtiger framework has to be extended towards this, but in theory this should be possible. The idea would be that vtiger offers an interface to register and unregister uitypes, the whole logic lays within the extension though… You could file an issue about this topic on code.vtiger.com...

> On 06.05.2016, at 18:17, dleicht <daniel.leicht at actato.com> wrote:
> 
> Hey @all,
> 
> I know this discussion is a bit old, but I have one more question about it..
> I want to add a custom UI-Type with a package. Now, I've done everything
> from the post below:
> 1. Added the PHP-File to my package's folder /modules/Vtiger/uitypes/
> 2. Added the Template file to my package's folder
> /layouts/vlayout/modules/Vtiger/uitypes/
> 3. Added the SQL-Statement in my vtlib-Handler-Class on the install event
> 
> Everything works fine, except that the PHP-File is not copied at all (seems
> like folders which don't have the module's name are ignored?)..
> Is there any 'non-dirty' way to do this ?
> 
> Regards, Daniel
> 
> 
> 
> S T Prasad wrote
>> Hi Alan,
>> This is what I would do
>> 0. Choose a unique name, Pick2radio and number, 999, for our new UI Type
>> 
>> 1. New script, Pick2radio.php, model it on the simple Picklist.php
>> Path
>> modules\Vtiger\uitypes
>> 
>> 2. Pick2radio.tpl, model it on Picklist.tpl, UI transformation to radio
>> logic goes here
>> Path
>> layouts\vlayout\modules\Vtiger\uitypes
>> 
>> 3, Insert record into vtiger_ws_fieldtype with values, 999 and pick2radio
>> (note the lower case)
>> SQL:
>> insert vtiger_ws_fieldtype set fieldtypeid=<maxvalue+1>, uitype=999,
>> fieldtype='pick2radio';
>> 
>> Use the new UI number 999 in any new field earlier defined in vtiger_field
>> as picklist type(16) to test the basic concept.
>> 
>> There is some more work to be done to handle the selection, new picklist
>> entries etc, but i guess you got the drift
>> 
>> Regards, ST Prasad
>> 
>> On Fri, Feb 13, 2015 at 5:12 PM, Alan Lord <
> 
>> alanslists@
> 
>> > wrote:
>> 
>>> I want to make a new UI Type field for vtiger 6 which basically turns a
>>> set of picklist values into a group of Radio buttons so you can only
>>> chose
>>> one.
>>> 
>>> Is there any documentation on creating new UITypes for vtiger 6?
>>> 
>>> TIA
>>> 
>>> Al
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> http://www.vtiger.com/
>>> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://vtiger-crm.2324883.n4.nabble.com/Vtigercrm-developers-Custom-UI-Type-tp15343p18994.html
> Sent from the vtigercrm-developers mailing list archive at Nabble.com.
> _______________________________________________
> http://www.vtiger.com/




More information about the vtigercrm-developers mailing list