How to change bunch of images in multiple choices using 'edit multiples'? | XM Community
Solved

How to change bunch of images in multiple choices using 'edit multiples'?

  • 20 August 2018
  • 5 replies
  • 345 views

Badge +2
Hi everyone, I'm very new to Qualtrics and thus need your suggestion about my problem. I'm currently writing a qualtrics for an economic experiment. All question types are multiple choice. In each option, I need to insert lots of small images to help my participant visualise the size of that option. What I currently have is to insert a table in each choice and then insert the pictures in each table. And the following picture is what I create using this method:

!

However, this is just for one product. I need to create something almost same except that I need to change the product picture (the dots). What I tried was that I copied the code in "Edit multiple" and then replace the file path with a new one and then put the new code into a new question 'edit multiple' section. However, when I click 'done', it shows an error.

So is there any way to quickly replace these dots with some other graphics? For example, another question may look like:

!

Thank you very much!

Xueting
icon

Best answer by Anonymous 20 August 2018, 10:22

View original

5 replies

Hello @xwan8838 ,

Step1: Just copy the edit multiple from previous question and paste in the edit multiple of next question. ( While copying and pasting be careful of space and next line because in edit multiple new line means new option)

Step2: Paste the following code in the js(onready) option of the question:

var reset = document.getElementsByTagName("img");
for (var i=reset.length; i--;) {
reset[i].src = "../pics/abc.png"; //image adddress
}
Hello @xwan8838 ,
Or this is much easy to understand and implement

Step1: Just copy the edit multiple from previous question and paste in the edit multiple of next question. ( While copying and pasting be careful of space and next line because in edit multiple new line means new option)

Step2: Paste the following code in the js(onready) option of the question:
` jQuery("img").attr('src','../pics/abc.png'); //replace image address with your own`
Badge +2
> @Shashi said:
> Hello @xwan8838 ,
> Or this is much easy to understand and implement
>
> Step1: Just copy the edit multiple from previous question and paste in the edit multiple of next question. ( While copying and pasting be careful of space and next line because in edit multiple new line means new option)
>
> Step2: Paste the following code in the js(onready) option of the question:
> ` jQuery("img").attr('src','../pics/abc.png'); //replace image address with your own`
>
>

Hi Shashi,

Thanks for your previous suggestion. However, I cannot use the js option to change my graphics because when I preview, I can clearly see the process that qualtrics upload some graphics first and then replace them with the ones according to my js option. I don't want my participants to see this so I cannot really use this option. What I want to try is to replace the image address in the edit multiple for each question. However, when I tried that and click done, the system shows the following message. The 1st image shows what I have when I paste and change image address in the edit multiple. The 2nd image shows the error message after I click done.

!
!

Do you have any idea about how I can fix this?

Thank you very much!
> @xwan8838 said:
> > @Shashi said:
> > Hello @xwan8838 ,
> > Or this is much easy to understand and implement
> >
> > Step1: Just copy the edit multiple from previous question and paste in the edit multiple of next question. ( While copying and pasting be careful of space and next line because in edit multiple new line means new option)
> >
> > Step2: Paste the following code in the js(onready) option of the question:
> > ` jQuery("img").attr('src','../pics/abc.png'); //replace image address with your own`
> >
> >
>
> Hi Shashi,
>
> Thanks for your previous suggestion. However, I cannot use the js option to change my graphics because when I preview, I can clearly see the process that qualtrics upload some graphics first and then replace them with the ones according to my js option. I don't want my participants to see this so I cannot really use this option. What I want to try is to replace the image address in the edit multiple for each question. However, when I tried that and click done, the system shows the following message. The 1st image shows what I have when I paste and change image address in the edit multiple. The 2nd image shows the error message after I click done.
>
> !
> !
>
> Do you have any idea about how I can fix this?
>
> Thank you very much!
>
>
>

1. Upload your images to graphics library.
2. Use some text editor like notepad++, do search and replace for all the src of image with the graphics url of the library
Badge +2
> @Shashi said:
> > @xwan8838 said:
> > > @Shashi said:
> > > Hello @xwan8838 ,
> > > Or this is much easy to understand and implement
> > >
> > > Step1: Just copy the edit multiple from previous question and paste in the edit multiple of next question. ( While copying and pasting be careful of space and next line because in edit multiple new line means new option)
> > >
> > > Step2: Paste the following code in the js(onready) option of the question:
> > > ` jQuery("img").attr('src','../pics/abc.png'); //replace image address with your own`
> > >
> > >
> >
> > Hi Shashi,
> >
> > Thanks for your previous suggestion. However, I cannot use the js option to change my graphics because when I preview, I can clearly see the process that qualtrics upload some graphics first and then replace them with the ones according to my js option. I don't want my participants to see this so I cannot really use this option. What I want to try is to replace the image address in the edit multiple for each question. However, when I tried that and click done, the system shows the following message. The 1st image shows what I have when I paste and change image address in the edit multiple. The 2nd image shows the error message after I click done.
> >
> > !
> > !
> >
> > Do you have any idea about how I can fix this?
> >
> > Thank you very much!
> >
> >
> >
>
> 1. Upload your images to graphics library.
> 2. Use some text editor like notepad++, do search and replace for all the src of image with the graphics url of the library

Yes, that's what I do here. I upload my image to graphics library and use the url found there to replace all the src. However, the system still shows this warning message.

Leave a Reply