[Vtigercrm-developers] vt7: How to update field from Javascript

Alan Lord alanslists at gmail.com
Fri Jan 20 15:41:27 GMT 2017


On 20/01/17 15:19, Susruthan Seran wrote:
> Try this..
>
> jQuery('input[data-name="svc_charges"]').attr('data-displayvalue',100);

It's getting somewhere...

In firebug that element now looks like:

> <input class="fieldBasicData" data-name="svc_charges" data-type="currency" data-displayvalue="2264.177655529488" data-value="0.00" type="hidden">

But this has not updated the value visible to the end-user. This is in 
the two nested <span> above the input tag...

I would have assumed that there would be some kind of API for this kind 
of thing in the Detail_js class or similar but I've been hunting around 
the code and can't find anything.

And picklists are just a nightmare... They really do seem to be empty 
until you click the pencil icon to edit them :-(

Al




More information about the vtigercrm-developers mailing list