Adding a block box for collecting Survey Introduction's Information and some more | XM Community
Skip to main content
Solved

Adding a block box for collecting Survey Introduction's Information and some more

  • March 26, 2019
  • 5 replies
  • 149 views

Hello, I need to add an information collection box of the person taking the survey like below: ! Any suggestion on how I can go about it? Below is what I made but it doesn't feel right. ! Is there a right way to do this? Because I was thinking about how a report would run for this and this would only show up as a respond data and not a driving group. Also, how do I restrict demographics from multiple responses from one institution? Thanks, Frank La

Best answer by JenCX

@FLA You can do this with a text type question, but use the form type. !

5 replies

JenCX
Level 5 ●●●●●
Forum|alt.badge.img+11
  • Level 5 ●●●●●
  • 683 replies
  • Answer
  • March 26, 2019
@FLA You can do this with a text type question, but use the form type. !

  • Author
  • 2 replies
  • March 26, 2019
@jpardicusick Oh! That looks great! Thank you so much! Is there a way where I can add a drop down option for the Institution Type instead of it having a text entry field?

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6083 replies
  • March 26, 2019
@FLA, Do you know JavaScript? You can write JavaScript to hide the text input and put a select (i.e., dropdown) in its place. Include an event handler to update the hidden text input with the selected value each time something is selected.

  • Author
  • 2 replies
  • March 26, 2019
@TomG Thank you for the help! My JS is pretty bad but I was able to make it work after some research. However, now I run into the below problem: ! Some of my institution types are pretty long name and it stretched the bar such that it looks uneven on phone and web page. Any suggestion on what I can do to make it better? Many Thanks, FLA

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6083 replies
  • March 26, 2019
> @FLA said: > Some of my institution types are pretty long name and it stretched the bar such that it looks uneven on phone and web page. Any suggestion on what I can do to make it better? Set the width on your select: ``` <select style="width:100%;max-width:100%"> ``` Set the width of your text inputs to match: ``` jQuery("#"+this.questionId+" .InputText").css("width","100%"); ``` It really isn't going to matter much on an actual phone because it will use it's native select (use preview QR code to preview on your phone).