How to insert image into SharePoint Survey Questions

1. Add SharePoint Survey Question and put the identifier tag to display the image.

e.g. Question:

What do you think about images below:


A. Amazing

B. Nothing special

C. Ugly

2. Add content editor and insert JavaScript to replace the identifier tag with image link.

<script language="JavaScript">

var className;
className = ‘ms-formlabel’;

var elements = new Array();
var elements = document.getElementsByTagName(‘td’);

for (var e = 0; e < elements.length; e++)
        if (elements[e].className == className)
                elements[e].innerHTML = elements[e].innerHTML.replace(‘#img01#‘,'<img src="{image path}"></img><br><br>’);


Note items with yellow highlight above.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s