[Ticket cloned from T10830: Go to the next page if a specific question is answered]
I want to change the ImagePicker template and for example show the textvalue in image.for example
Do I have to realize this in CSS or can we change the whole template easily? :-)
Hello Sven,
I believe it should be possible to override rendering for the Image Picker element. However, some additional code changes may be required from our side. I'll discuss this with the development team and get back to you shortly.
Okay, thank you!
If it would be possible to create or overwrite the hole template without recompiling the core, i think it would be the best opportunity.
Hello Sven,
I've just realized that you can display a label above an image item using the General | Show Image Captions property (showLabel).
Please let me know if this option works for you. Otherwise, we'll consider overriding an item template.
Hi Jane,
this helps us only partially.
In fewer versions we had done this via SurveyTemplateText
var template = document.getElementById("template-imagepicker").text; new Survey .SurveyTemplateText() .replaceText(template, "question", "imagepicker");
Is that no longer possible?
Hello Sven,
Thank you for the clarification.
Would you please elaborate on this? Do you mean that you wish to display a label/caption not under an image item, but above (e.g., at the center) of an image item?
In the current version, you may customize question templates by extending a corresponding component (check this demo). If we're talking about an Image Picker question, an image item is represented by the SurveyQuestionImagePickerItem element. An image template content is defined in the renderElement function.
I've investigated this task, however, now, it seems to be impossible to override rendering for the SurveyQuestionImagePickerItem element. Would you please confirm whether you'd like to override the default Image item template?
I look forward to your reply.