Can you autopopulate text in Multiple Choice "Allow Text entry"? | XM Community
Skip to main content

I can enable autocomplete on free text questions with the script below, but it doesn't work on multiple choice where I enable text entry for an option.
This would be the question, I would like to have the text entry populate the available building IDs.
Question:
" Q: Please provide your location

  • Type your building ID (Text Entry enabled for this option)

  • I would rather not answer "


This is the script that works for free text questions:
{
var textOptions = [
"Text Option 1","Text Option 2","Text Option 3"
];
jQuery('.QR-' +this.questionId).autocomplete({source:textOptions});

Hi Josue

I have used below code and it worked.
var textOptions = ["Text Option 1","Text Option 2","Text Option 3"];
jQuery("input[type=text]").autocomplete({source:textOptions});


Thank you PraDeepKotian_Ugam ! That one did the trick. Appreciate the help.


Leave a Reply