How to hide placeholder from message composer


(Nilesh Patil) #1

Hello,

I changed the placeholder text from admin-customize-text content. I change the text of placeholder (In composer) to guide my user to post nice content. But that same placeholder text showing in all composer like in reply, in message composer. So my question is how to hide placeholder from the certain composer as I don’t want to show placeholder in Message composer box.

Or can we create the separate placeholder for creating new topic composer and message composer?

Please help…


(Vinoth Kannan) #3

Instead you can use topic templates.


(Nilesh Patil) #4

Yes… but topic template contains pre defined text and we don’t have any. It is educational forum. That’s why i’m using placeholder to guide them.

So, is there any solution for my question?

Thank you.


(Kris) #5

You can hide placeholders with CSS. For example, the main textarea in the composer:

#reply-control  {
    textarea::-webkit-input-placeholder    { visibility: hidden; }
    textarea::-moz-placeholder             { visibility: hidden; }
    textarea:-ms-input-placeholder         { visibility: hidden; }
}

You just need to adjust the classes to target the specific inputs you want to hide placeholders for.


(Nilesh Patil) #6

Thank you so much @awesomerobot for reply.

But you given CSS is hiding placeholder from all composer i.e. Composer for New Topic, Reply, Message…

I want to hide placeholder from the only message composer, not from other. I want keep placeholder for New Topic and Reply.


(Kris) #7

You just need to add the correct classes in the CSS (you can find them by using the web inspector for your browser). This should do it.

#reply-control.private-message  {
    textarea::-webkit-input-placeholder        { visibility: hidden; }
    textarea::-moz-placeholder                 { visibility: hidden; }
    textarea:-ms-input-placeholder             { visibility: hidden; }
    #reply-title::-webkit-input-placeholder    { visibility: hidden; }
    #reply-title::-moz-placeholder             { visibility: hidden; }
    #reply-title:-ms-input-placeholder         { visibility: hidden; }
}

(Nilesh Patil) #8

Wow… It’s working…
That’s what i needed…

Thank you so much…
You’re really Awesome.