[Vtigercrm-developers] Q. on vt7 Detail/Summary view picklists
Alan Lord
alanslists at gmail.com
Thu Jan 26 10:48:06 GMT 2017
Just to follow up with some more info, the markup linked to below shows
the state of the DOM _after_ you have changed a picklist value in Detail
View.
IMHO this really is not very well implemented.
Bits of that DOM change when you change a picklist option but the key
part of the DOM - which would be the ideal bit to read data from -
doesn't :-(
The line below shows the value *after* I have changed the picklist from
512 to 256.
> <input class="fieldBasicData" data-name="lsfwd_rate" data-type="picklist" data-displayvalue="512" data-value="512" type="hidden">
On screen it now says 256. In the database the field value has been
saved as 256. And in the horrendously-hard-to-grab select2-chosen span
tag referred to earlier it reads (Note: this is the "display value" not
the true value - if this was a translated text string it would not be
usable):
> <span class="select2-chosen" id="select2-chosen-1">256</span>
In the original <select><options...> the option value 512 is still set
as "selected":
> <option value="512" selected="">512</option>
When in fact, I have already clicked the pencil icon, changed the value
to 256 and clicked the tick to save it.
This is *really* hard to deal with...
Al
On 26/01/17 10:32, Alan Lord wrote:
> 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.
More information about the vtigercrm-developers
mailing list