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

Susruthan Seran susruthanz at gmail.com
Fri Jan 20 18:08:40 GMT 2017


I hope this will help you.

$('input[data-name="svc_charges"]').parents().find('.currencyValue').html("test");

Replace the *test *with your value to show. I'm not much familiar with 
Detail_js but will solve your problem I hope.


On 01/20/2017 09:11 PM, Alan Lord wrote:
> 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
>
>
> _______________________________________________
> http://www.vtiger.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20170120/4081fbe0/attachment-0001.html>


More information about the vtigercrm-developers mailing list