Open baden32 opened 2 years ago
The json received with data (not develepped on my side) contains field "type" with a numeric value (1, 3,4, etc.). This info represent a category and I would like to use template iconLeft in order add an icon according to this value.
In my Easycomplete options, I set this:
template: { type: "iconLeft", fields: { iconSrc: "type" } },
As type is only containg a numeric value, no image can be displayed.
So is there a way to dynamically change the received value (in. 2) into a valid image url (ie. /files/images/2.png) ?
Thanks a lot for your help. Joe
The json received with data (not develepped on my side) contains field "type" with a numeric value (1, 3,4, etc.). This info represent a category and I would like to use template iconLeft in order add an icon according to this value.
In my Easycomplete options, I set this:
template: { type: "iconLeft", fields: { iconSrc: "type" } },
As type is only containg a numeric value, no image can be displayed.
So is there a way to dynamically change the received value (in. 2) into a valid image url (ie. /files/images/2.png) ?
Thanks a lot for your help. Joe