Image widget
The image widget displays an image. It can include a description.
Example
Properties
Property |
Description |
Data type |
---|---|---|
|
Name of event that fires when a user clicks the image. |
string |
|
Unique identifier of this widget. |
string |
|
Layout, which is either: |
enum |
|
Image width and height, in pixels. |
integer |
|
URL of the image. |
string (URL) |
type
|
Rich-media type, which is always Image . |
string |
Widget-specific expression evaluations
Property |
Description |
Example |
Data type |
---|---|---|---|
|
URL of selected image. |
#widget1.img1.selectedImage
|
string |
|
Index of selected image. |
#widget1.img1.selectedIndex
|
integer |
Code samples

var obj = {
"widgetType": "form",
"nodes":
[{
"id": "widget1",
"controls": {
"0": {
"type": "Image",
"src": ["https://via.placeholder.com/100", "https://via.placeholder.com/100",
"https://via.placeholder.com/100", "https://via.placeholder.com/100"],
"id": "img1",
"event": {
"name": "imgClick"
},
"size": {
"width": 100,
"height": 100
}
}
}
}
]
}

var obj = {
"widgetType": "form",
"nodes":
[{
"id": "widget1",
"controls": {
"0": {
"type": "Image",
"src": ["https://via.placeholder.com/150", "https://via.placeholder.com/150",
],
"id": "img1",
"size": {
"width": 150,
"height": 150
}
}
}
}
]
}

var obj = {
"widgetType": "form",
"nodes":
[{
"id": "widget1",
"controls": {
"0": {
"type": "Image",
"src": ["https://labs.digital.nuance.com/ciapi/images/debit.png",
"https://labs.digital.nuance.com/ciapi/images/travel.png",
"https://labs.digital.nuance.com/ciapi/images/prepaid.png"
],
"id": "img1",
"size": {
"width": 200,
"height": 150
}
}
}
}
]
}