Protecting displayed text | XM Community
Skip to main content
Solved

Protecting displayed text

  • June 12, 2019
  • 6 replies
  • 12 views

I've been asked if we can carry forward responses to a second screen where we "re-ask" information. Example: What is your address? If a respondent provides some of the info, we would ask again, differently: ......can you provide a cross street if you can't remember the exact address. On the second screen, I have filled in the information provided from the first (see screen shot) QUESTION: Is there a way to protect their answers on the second screen so that they cannot edit them on the second screen? (right now, based on the screen shot, they can). !

Best answer by TomG

> @Terri_Z said: > if I pipe in text into a text form response, is there a way to protect it? So it would just be there for reference? Client doesn't want it in the form description, but in the text box. Any help would be appreciated! You can use JS to make an input field readonly. Something like: ``` jQuery("#"+this.questionId+" .InputText").each(function() { var input = jQuery(this); if(input.val().length > 0) input.prop("readonly", true); }); ```

6 replies

JenCX
Level 5 ●●●●●
Forum|alt.badge.img+11
  • Level 5 ●●●●●
  • June 12, 2019
If it were me, I'd just have it be a second question with only the cross street shown, or a second question with text piped into the description instead of in the question itself.

  • Author
  • June 13, 2019
> @jpardicusick said: > If it were me, I'd just have it be a second question with only the cross street shown, or a second question with text piped into the description instead of in the question itself. So would I, but alas, I am just following specifications.......so would that be a "no", can't be done?

JenCX
Level 5 ●●●●●
Forum|alt.badge.img+11
  • Level 5 ●●●●●
  • June 13, 2019
@Terri_Z I can't think of a way to do it but there may be a custom code solution.

  • Author
  • June 13, 2019
I wrote the following, because I've hidden responses before, but am not sure what to call the text box. I piped in the answer as suggested, just want to get rid of the box so they can't change it.......will this work and what would the ???? be called? var city = "${q://QID107/ChoiceTextEntryValue/3}"; if (city >0){ jQuery("[id$=QID108-2-?????]").css('display',none); }

  • Author
  • June 18, 2019
if I pipe in text into a text form response, is there a way to protect it? So it would just be there for reference? Client doesn't want it in the form description, but in the text box. Any help would be appreciated!

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Answer
  • June 18, 2019
> @Terri_Z said: > if I pipe in text into a text form response, is there a way to protect it? So it would just be there for reference? Client doesn't want it in the form description, but in the text box. Any help would be appreciated! You can use JS to make an input field readonly. Something like: ``` jQuery("#"+this.questionId+" .InputText").each(function() { var input = jQuery(this); if(input.val().length > 0) input.prop("readonly", true); }); ```