Community Groups are officially here!
We've released Groups, a new feature that enables us to connect community members of similar industries and interests in a shared, private space. You can check out all of the details here, including information about who can join, how to join, and what Groups are currently offered. Please leave your feedback through this Community Groups Feedback Survey.

Text entry box like a tweet

Clin
Clin Paris/VancouverCommunity Member Qubie ✭

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

  • Clin
    Clin 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.

  • Clin
    Clin Paris/VancouverCommunity Member Qubie ✭

    Thanks!