Best answer by Clint
View originalHow to add static text after a text entry box?
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?
Page 2 / 2
Hi @gwrightiv! If you have a different question, it would be best to start a new question so that it goes into the "Unanswered" queue and gets more attention from other users. That doesn't mean you can't link back to this thread, however!
hijacking this thread, Is there a way to add a grey text into the text field that after clicking in goes away?
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'});
}
});
```
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'});
}
});
```
Page 2 / 2
Leave a Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.