[Vtigercrm-developers] Q. on vt7 Detail/Summary view picklists
Alan Lord
alanslists at gmail.com
Thu Jan 26 10:32:47 GMT 2017
To answer my own question, No. There isn't any write facilities to the
uimeta var.
I have decided to approach my task in a different direction instead...
But I am still really struggling with the implementation of fields in
vtiger 7...
Please see the attached snippet of a picklist field in Detail View:
http://paste.ubuntu.com/23868473/
Please can a vtiger dev explain the correct way to read the real value
of this field (Not the display value)?
The only place I can see it is inside this span
> <span class="select2-chosen" id="select2-chosen-1">512</span>
But accessing it seems to be overly complex in terms of the amount of
DOM tree one has to traverse to get to it.
Is there an API (in "app" or "helper" for example) for accessing field
values?
My particular query now is for a Picklist, but I guess that depending on
the UIType of the field you want the DOM is going to be very different
for each kind of field...
Thanks
Al
On 20/01/17 16:20, Alan Lord wrote:
> OK - can one of the vtiger devs please talk about the "uimeta" API?
>
> My colleague found the list of Picklist options hidden in a Javascript
> var. I can read the field info by running, for example:
>
>> uimeta.field.get('lsdwnld_rate');
>
> What else can I do with this?
> Can I "set" it?
> Can I tell it to update/re-render?
> Does it apply to all fields? (It seems to)...
>
> TIA
>
> Al
>
> On 20/01/17 10:09, Alan Lord wrote:
>> I'm wanting to modify the options (remove some) available in a Picklist
>> using Ajax when in Detail View. (I haven't looked at this in Edit View
>> yet).
>>
>> Something is a bit odd...
>>
>> After the first page load, but before you click the pencil icon to edit
>> the Picklist, none of the option values for the picklist seem to exist
>> in the DOM.
>>
>> If I click on the pencil, then close the edit by clicking on the "X",
>> the values are now in the DOM.
>>
>> Questions:
>>
>> How can I update the values of a picklist before any user activity using
>> Ajax? e.g., Is there an event I can listen for which is populating the
>> DOM when I click on the pencil edit button?
>>
>> Is this data reloaded every time that pencil is clicked or can I just
>> update the picklist once per page load?
>>
>> Al
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>
>
> _______________________________________________
> http://www.vtiger.com/
>
More information about the vtigercrm-developers
mailing list