Is there a way to switch out an image based on a user's response? | Community
Skip to main content
Answered

Is there a way to switch out an image based on a user's response?


Forum|alt.badge.img

We want to show a different image based on prior user selections or a hidden field that is passed to the survey. Is there a way to do this?

Thanks,

John

Best answer by picsoung

Hey,

The only way to do this would be to create all the possible options, either manually or via API (better 😉)

Using the Create API you could modify your form to add options, questions and logic branches.
We even have an endpoint to upload image to Typeform.

Hope it makes sense

View original

6 replies

Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14905 replies
  • October 6, 2021

Hi @John F. Kennedy What a famous username ha! 
 

You could show a different question with a different image based on the hidden fields, though you wouldn’t be able to change out the image specifically. I have an example of what this would look like in the video in the post below: 

Would this work for you? 


Forum|alt.badge.img

Hi Liz,

Thank you for your quick replay and comment on my name. 

The different question with a different image is an option. We have quite a few image options (~300). I was just hoping it would be easier.:disappointed_relieved:

Thanks,

John


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14905 replies
  • October 7, 2021

Ah yes, that would be quite a bit of a setup! I can’t think of a different workaround offhand, but @picsoung may have a very tech-y one I’m missing!


picsoung
Typeform
Forum|alt.badge.img+5
  • Developer Advocate @ Typeform
  • 384 replies
  • Answer
  • October 8, 2021

Hey,

The only way to do this would be to create all the possible options, either manually or via API (better 😉)

Using the Create API you could modify your form to add options, questions and logic branches.
We even have an endpoint to upload image to Typeform.

Hope it makes sense


Forum|alt.badge.img

@picsoung Thank you for your input and suggestion to use the API. I’ll look into it. @Liz Thank you for pinging picsoung.


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14905 replies
  • October 11, 2021

Let us know how it goes, @John F. Kennedy !


Reply