XF 2.1 Textfield - Placeholder Text

AlBundy

Member
Hi,
is there a possibility to put a placeholder-text into the textfield? (if possible without addon).
Perhaps only in selected forums/categorys.

Thanks ! :)


Anmerkung 2020-07-15 095531.webp
 
Edit the forum_post_thread template and add:

HTML:
<xf:if is="$forum.node_id == 1">
<xf:js>$("textarea[name='message_html']").html("Placeholder text");</xf:js>
</xf:if>

Change the node ID and text as required.
 
Edit the forum_post_thread template and add:

HTML:
<xf:if is="$forum.node_id == 1">
<xf:js>$("textarea[name='message_html']").html("Placeholder text");</xf:js>
</xf:if>

Change the node ID and text as required.
I tried this and it works in posting a thread, how about posting a reply? I need to edit the placeholder too
 
Top Bottom