Helpful hint / Watermark in textbox | XM Community
Solved

Helpful hint / Watermark in textbox

  • 26 July 2018
  • 7 replies
  • 235 views

Hello,

Is there a feature or code to add a hint / watermark to open text response fields within a survey? Example below.

Thanks,
Joe

!
icon

Best answer by mattyb513 26 July 2018, 12:20

View original

7 replies

Userlevel 7
Badge +33
@Joe_Thompson , when you right click on Open end text box in question you will get option to "Add default choices" when you add that and preview it will appear as water mark and respondent can enter answer replacing it there.
Userlevel 7
Badge +33
Another way is to use below code in descriptive text:
!
@bansalpeeyush29 Thanks for the help. Is there a way to have the watermark/hint go away as soon as they start typing? Instead of having to delete the preview and then provide an answer. Usually I've seen the preview as a grayed out text and it gets replaced by darker/black text as soon as you enter a response/email/phone number/etc.

Thanks,
Joe
Userlevel 6
Badge +6
What you are looking for is the `placeholder` attribute.

Here is a gist with some JavaScript that will work for any Text Entry style question: https://gist.github.com/mattbloomfield/ff4609bd60d697d1b1c7f617d046c8e1

Working Example: https://qualtricssfi.az1.qualtrics.com/jfe/preview/SV_4ZTCCfeAVOb7Anr?Q_SurveyVersionID=current&Q_CHL=preview

I've attached the .qsf for your review.
@mattyb513 That's what I was looking for! Thank you for the prompt assist!
Userlevel 4
Badge +20
@Joe_Thompson - did you ever get a solution to help with the hint going away as the user types? Thanks!

Where are you supposed to type the text? It is not working for me. I have put it in the box, and then went to default choices... does this not work in a text box in a matrix table?
Matrix Table.PNG

Leave a Reply