Text entry box like a tweet

ClinClin Paris/VancouverCommunity Member Qubie ✭

Text entry box like a tweet

Hi,
I would like to have participants complete a tweet that ends by #...
Ideally I would like to have the same box as on Twitter when you enter a post, with just a #... static at the end of the post
Alternatively I would like to have just a box with #... at the end
Any ideas ?

Best Answer

  • [Deleted User][Deleted User] Qubie ✭
    Accepted Answer

    Hello @Clin ,

    Paste the following code in the js(onReady) of Text entry question

    jQuery("[id='QR~"+this.questionId+"']").val("#xxx");
        jQuery("[id='QR~"+this.questionId+"']").keyup(function(){
    
         var k=jQuery(this).val().replace(/#xxx/g, "");
            jQuery(this).val(k+"#xxx");
    
        });
    

Answers

  • Hello @Clin ,

    Paste the following code in the js(onReady) of Text entry question

    jQuery("[id='QR~"+this.questionId+"']").keyup(function(){
    
           var k=jQuery(this).val().replace(/#/g, "");
            jQuery(this).val(k+"#");
    
        });
    

    The above code will append '#' at the end of user input

  • ClinClin Paris/VancouverCommunity Member Qubie ✭

    Hi @Shashi
    Thank you so much for your help.
    Is there a way I can have the #xxx appear at the end of a multiline text entry box, even before the participant starts typing? and it should stay while he/she is typing.

  • ClinClin Paris/VancouverCommunity Member Qubie ✭

    Thanks!

Sign In to Comment