Move text entry field | XM Community
Skip to main content
Solved

Move text entry field


Hello everyone, I'm working in a multiple choice question. There is a "others" choice at the end with an additional text entry field. I would like to know if it is possible to move the text entry field next to the "others" button, so that it's in one line. Many thanks in advance for your help! !

Best answer by MohammedAli_Rajapkar

Here is the demo link: https://qimpl.az1.qualtrics.com/jfe/preview/SV_1RqO5Wzvc6QLdB3?Q_SurveyVersionID=current&Q_CHL=preview This work for one other specify box... add below code in JavaScript (OnReady Function) var QID = this.questionId; var QIDOtherLabel = jQuery("#" + QID).find(".TextEntryBox").siblings().attr("id"); jQuery("[id='" +QIDOtherLabel+"']").append(jQuery("#" + QID).find(".TextEntryBox")); jQuery("[id='" +QIDOtherLabel+"']").css("padding-top","30px"); jQuery("[id='" +QIDOtherLabel+"']").css("padding-bottom","30px"); jQuery("#" + QID).find(".TextEntryBox").css("float","none");
View original

13 replies

Eesh
QPN Level 2 ●●
Forum|alt.badge.img+3
  • QPN Level 2 ●●
  • 67 replies
  • September 7, 2018
@Melissa, Yes, it is possible. Just click on other, you will see a drop down. From the drop down option select "Allow Text Entry." Please also find the screenshot attached. Hope this helps. !

  • Author
  • 9 replies
  • September 7, 2018
Thanks for the quick answer. Apparently my question was misleading. I was wondering if it is possible to change the position of the text entry field. When I check the preview of the survey, the text entry field appears underneath the box "Andere". So is it possible to change the position of the text entry field, so that it appears right beside "Andere"? I attached a screenshot to my original post.

MohammedAli_Rajapkar
QPN Level 5 ●●●●●
Forum|alt.badge.img+20
Here is the demo link: https://qimpl.az1.qualtrics.com/jfe/preview/SV_1RqO5Wzvc6QLdB3?Q_SurveyVersionID=current&Q_CHL=preview This work for one other specify box... add below code in JavaScript (OnReady Function) var QID = this.questionId; var QIDOtherLabel = jQuery("#" + QID).find(".TextEntryBox").siblings().attr("id"); jQuery("[id='" +QIDOtherLabel+"']").append(jQuery("#" + QID).find(".TextEntryBox")); jQuery("[id='" +QIDOtherLabel+"']").css("padding-top","30px"); jQuery("[id='" +QIDOtherLabel+"']").css("padding-bottom","30px"); jQuery("#" + QID).find(".TextEntryBox").css("float","none");

  • Author
  • 9 replies
  • September 11, 2018
@Mohammedali_Rajapakar_Ugam Great, thanks!

  • 10 replies
  • September 26, 2018
Related to this question: is there a way to increase the space between the option label and the text entry field? In a multiple choice question, I have "Other" with a text field beside it, and the text field is jammed up against the word "Other" without any spacing. I see "padding-left" did not work. Is there something like "padding-between" that achieves this?

MohammedAli_Rajapkar
QPN Level 5 ●●●●●
Forum|alt.badge.img+20
Try adding space after "Other "

  • 10 replies
  • September 26, 2018
Thanks for suggestion--that does not work, unfortunately.

MohammedAli_Rajapkar
QPN Level 5 ●●●●●
Forum|alt.badge.img+20
Can you share a screen-shot?

  • 10 replies
  • September 26, 2018
Now the space is working. I think it was a bug or something hadn't updated properly. Thank you @Mohammmedali_Rajapakar_Ugam

Forum|alt.badge.img+3
@Mohammedali_Rajapakar_Ugam Thanks for sharing this answer! I need the same thing, but want to have the Question show first, then the text entry to the right of the question. The above JS code from above displays text entry box first then the question. How can I switch that positioning?

  • Author
  • 9 replies
  • October 26, 2018
@Mohammedali_Rajapakar_Ugam Related to your answer from the 8th of Oct: Is there a way to adapt the code so it works also for a multiple choice question with two other specify boxes? At the moment it looks like this: !

cma
  • 24 replies
  • November 1, 2019
> @Melissa said: > @Mohammedali_Rajapakar_Ugam Related to your answer from the 8th of Oct: Is there a way to adapt the code so it works also for a multiple choice question with two other specify boxes? > > At the moment it looks like this: > > ! > I also would like to know how to adapt the code so it applies to every instance of 'text box entry' in a single questions instead of just the first instance of 'text box entry'. Any guidance would be greatly appreciated!

mollybergin
Forum|alt.badge.img+3
cma wrote:

> @Melissa said:
> @Mohammedali_Rajapakar_Ugam Related to your answer from the 8th of Oct: Is there a way to adapt the code so it works also for a multiple choice question with two other specify boxes?
>
> At the moment it looks like this:
>
> !3r_oyzvpj8bif1w.png
>

I also would like to know how to adapt the code so it applies to every instance of 'text box entry' in a single questions instead of just the first instance of 'text box entry'. Any guidance would be greatly appreciated!

I used this code and it worked!

 

Qualtrics.SurveyEngine.addOnload(function() {

  jQuery("#"+this.questionId+" .TextEntryBox").each(function() {

      var tb = jQuery(this);

      tb.css({"float":"none","background-color":"white","width":"100%"});

      tb.prev("label").css("display","block").append(" ").append(tb);

  });

});


Leave a Reply