I have a list as a web part like this:

enter image description here

And I added an Script Editor Web Part to inject JavaScript to this list:

enter image description here

Now in List I have a field called "Status Value".

enter image description here

I want to do exactly this. Depending of selected value show me an image. How can I do that in sharepoint online using Script Editor Web Part (SEWP)?

2 Answers 2


I checked your example, it just shows the color based on the selected value. So you can achieve this via Jquery and CSS in Script Editor Web Part at the New Form as the following

The script

#circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;

<script src="http://code.jquery.com/jquery-1.7.2.min.js" type=text/javascript></script>
<script type="text/javascript">
$("select[title='Color']").change(function() {   document.getElementById("circle").style.backgroundColor=$("select[title='Color']").val();
<div id="circle"></div>


enter image description here


I answered something similar to this a while back. You can use calculated fields to get your desired results. Place your images into a local library and call them from there. See if this will get you on the right path.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.