How to add static text after a text entry box? | XM Community
Solved

How to add static text after a text entry box?

  • 11 November 2017
  • 29 replies
  • 2816 views


Show first post

29 replies

Userlevel 7
Badge +27
I'm fairly certain that the pipe of the first choice in Q490 is NOT ${q://QID490/ChoiceTextEntryValue/1}. As I said in my last message, using "Piped text..." select the Q490 choice description into your question text. That will give the you the correct pipe string (with a QID that is not QID490). Then cut and paste it from your Question Text into your JS.

I don't understand your "Should I pipe to the new translated question(English) or to the original question (Indonesia)?" question. You can't choose which language to pipe. Qualtrics pipes the current language.
Userlevel 2
Badge +3
Hi @TomG
This is how I do the pipe text.
!
The result that I got is ${q://QID490/ChoiceTextEntryValue}
Am I doing it wrong?

___I don't understand your "Should I pipe to the new translated question(English) or to the original question (Indonesia)?" question. You can't choose which language to pipe. Qualtrics pipes the current language.___
What I mean for that question is, when I want to choose questions to pipe, should I choose my original question or should I choose new question that I just created (English).

Also, as I said, when I do think, my original question did not contain static year anymore.
Thank you.
Userlevel 7
Badge +37
I am using this approach and it works perfectly when (a) I only have one text prompt or (b) all the prompts on a grid should have the same label. I am wondering if there is a tweak I need to use so that I could use two different labels (where one label should be "days" and another should be "%" for example)?



> @Clint said:
> With the addition of some JavaScript on the question, you can get this done.
>
> This example shows how to put text on either side of the text entry box.
> https://gist.github.com/13bzhang/92be517b6558132c78620ad029c77f4d
>
> ```
> Qualtrics.SurveyEngine.addOnload(function()
> {
> /*Place Your Javascript Below This Line*/
>
> var inputs = $(this.getQuestionContainer()).select('input[type="text"]');
>
> for (var i = 0; i < inputs.length; i++) {
> var input = inputs[i];
> $(input).insert({before: 'In '});
> $(input).insert({after: ' years'});
> }
>
>
> });
> ```
Badge +2

The github link no longer works

Leave a Reply