How to add static text after a text entry box? | XM Community
Skip to main content
I'd like to add static text after the text entry box. I want to include "@[company].com" to make it clear the respondents should enter their ID rather than their entire email. How can I add this after the text box?
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.
@Sheryl,



Yes, unfortunately, you are doing it wrong. I think you've misunderstood what I've been trying to explain from the beginning. I'll start from the beginning one last time:



1. Create a multiple choice question at the BEGINNING of your survey. Label it "PT" for "Piped Translations". Respondents will not see this question. It's only purpose it to contain words or phrases that need to be piped into various parts of the survey in the current language.

* * Add to the PT question, in your base language, words or phrases that you will need to pipe as choices

* * After adding the choices to the PT question, translate the choices using the Qualtrics translate functionality

* * Hide the PT question using display logic. Use a display logic condition that is always false.



2. Pipe the PT question choice descriptions into other questions in the survey as needed. Make sure you use the correct pipe string. One way to do this is to go to a question's text and click on "Piped text...", then choose the PT question and the appropriate choice description. This string can then be copied wherever you need it (e.g. into a JavaScript).
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'});

> }

>

>

> });

> ```

The github link no longer works


Leave a Reply