I'm wondering if there is a way to add predictive text to a text entry question.
I.e.
What kind of car do you drive?
When the respondent begins typing A.. options like Audi, Aston Martin, Alfa Romeo pop up.
<link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>
Then set up your question as a Multiple Choice with either a dropdown or multi-select box that contains all the possible answers. Go to the Advanced Question Options and Add Javascript. In the AddOnReady section paste in the following JavaScript code:
`jQuery("#"+this.questionId+" select").select2({ placeholder:"Select an option" });`
Hey @GrayMatterThinking, can you please provide more detail your instructions for adding predictive text? I am using the survey builder and don't see the option to switch to HTML view in Look & Feel - General - Header.
I also don't see where to add Javascript in the Advanced Questions options....
Sorry for the newbie questions.
Thanks!
Hi kjohnston
I'm interested in using Select2 in order to create a multi-select box like the one here.
Did you manage to figure out how to create such a box? I'm reading several posts about it but none of them provides clear step-by-step information.
Best
kjohnston , I had the same problem. It turns out that advanced question editing is hidden and not available on trial accounts. It's hard to show POC to my business and why we should get this when I can't actually use the product...
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.