Answered

Picture choice selectiom


Hello
I trust you are doing fine

Can you please give me more information of the below :

Example: I have a picture selection as follows
1- image 1
2- image 2
3- image 3
4- image 4

Suppose i have an artwork, and I want to add a link to it , so that when the user click on the link , it auto select the image 1 in the typeform , is it possible to do so ?

Thank you in advance

icon

Best answer by mathio 31 May 2021, 12:47

View original

18 replies

Userlevel 7
Badge +5

Hi @Heman Thanks for stopping by! I’m afraid I can’t think of a solution offhand that would automatically select an image, but do you mind sharing a bit more about your workflow/form? This might help inspire some other ideas!

Userlevel 7
Badge +5

Hello @Heman ,

I think this is might be more technical challenging but it should be doable.

Lets consider this form: https://form.typeform.com/to/e5Oy218c

When building the form, I will set custom question reference for my first question (Settings → For Developers → Block references), in my case I named it picture.

Then I have to append a hash to the URL in the following format:

#answers-<question-reference>=<answer-reference>

In my case it will be:

#answers-picture=<answer-reference>

I dont think you can find the answer reference in the builder nor change it (or can you? 🤔), but you can look into the form definition in JSON format - for my form it is here (you can use your own form id instead of e5Oy218c):

https://form.typeform.com/forms/e5Oy218c

You can find reference for each answer (picture) there at fields.0.properties.choices.*.ref

For the form above you can use the following links to prefill answer:

If the picture choice question accepts multiple answers (like the form above) the form will not automatically progress to next question. However you can prefill multiple answers by separating them with a coma, eg:

Userlevel 7
Badge +6

@mathio - thanks for this, it’s going to be a small challenge to decompose and make it work but I think it is do-able for many of us. 

My question at this point is that it appears the images are all uploaded into the gallery at Typeform - is there an option to point to images in other locations ie a corporate website rather than requiring them to load into the Gallery??

 

des

Userlevel 7
Badge +5

@john.desborough you are welcome. I dont think you can use images from external locations in picture choice.

Hello @mathio , Thank you very much for your explanation, i will try it and will let you informed you afterwards.

Thank you

Userlevel 7
Badge +6

@john.desborough you are welcome. I dont think you can use images from external locations in picture choice.

I appreciate that. I think it would be nice to have but i can appreciate the formatting ‘nightmare’ it would cause the platform in terms of presentation within the question ‘pic size’ … 

des

I need to pre-fill more than one answer in a multiple choice question. The #answers-<question-reference>=<answer-reference> approach is very useful and I am glad I discovered it here in the community. I have this to use this approach to pre-fill multiple choice questions but did not succeed so far. Any suggestions?

Userlevel 7
Badge +5

@asidhu you can use coma , to separate multiple refs if you have a multiple choice question with multiple selection enabled.

I updated my form above to allow multiple selection. This link will preselect 2 choices (but will not continue to next question since respondents might want to select more):

https://form.typeform.com/to/e5Oy218c#answers-picture=34f9913a-88af-4128-8d05-68ecd53ebd3c,ec824dfb-3637-4df9-bebe-a7fa1716f2b0

Thank you for the quick response. I have tested it on my own form and it worked!

Userlevel 7
Badge +5

Glad to hear this worked, @Asle ! Let us know if we can help with anything else. :grin:

Any idea how can we populate first name text field?

Userlevel 7
Badge +5

Hi @jasonbourne are you wanting to populate the name from something like an email marketing tool? If so this option might help.

Hey @Grace,

I have a typeform which patient fills. It has the data like first name, last name, email. Patient has to fill it in every few weeks. Since user first name last, email will not change so I want to prepopulate the form so he will not fill same thing again and again. Is it possible?

 

Userlevel 7
Badge +5

Hey @jasonbourne this should be possible using hidden fields 😊

Hidden fields are good to populate the labels. Can I update a text field? Check image.

 

Userlevel 7
Badge +6

@jasonbourne - unfortunately you can’t pre-populate the “content” of the text field directly with name ie have “des” already showing in the field.. 

the workaround at the moment is to use logic rules on hidden fields to start the form: 

  • if a hidden field is passed into the form ie in the url string you have ?name=xxxxx  (which is the way that typeform adds hidden fields to the form’s url,) is xxxxx then go to the enter your name form.. if the hidden field is NOT xxxxxx then go to another start point like a statement page that says “welcome back @name … ready to book another session” 

that way you can use the same form for the complete fill in or you can have the values added to the url string (you mention first name, last name and email...) and display them on pages and have them submitted along with the data as the hidden fields are available as data elements in the form. 

 

hope that makes sense and will help a little 

 

des

@john.desborough  or @mat, Is this technique also possible when using the embed option?

In the Popup embed, I don’t have a typeform url but rather code like this:
 

<button class="button-right-icon w-inline-block" data-tf-popup="HnszdukE" data-tf-opacity="100" data-tf-size="100" data-tf-iframe-props="title=clap Anfragen" data-tf-transitive-search-params data-tf-medium="snippet" data-tf-hidden="geschenk=,anlass=onboarding,source=webflow_onboarding">Jetzt anfragen<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.6075 11.3572L11.255 7.90897L12.1388 7L17 12L12.1388 17L11.255 16.091L14.6075 12.6428H7V11.3572H14.6075Z" fill="currentColor"></path>
</svg></button>
<script src="//embed.typeform.com/next/embed.js"></script>

 

Userlevel 7
Badge +5

Hi @kschaefers This technique is still possible with an embedded form. Our article here can walk you through using hidden fields with the embed code. 😀

Reply