Go to main content

Comment name input

Contents

Syntax

<txp:comment_name_input />

The comment_name_input tag is a single tag which is used to display a text entry field to accept the commenter’s name. Used in the comment input form template.

Attributes

Tag will accept the following attributes (case-sensitive) as well as the global attributes :

aria_label="text" v4.7.2+
HTML aria-label attribute to be applied to HTML form text input field.
Default: unset.
placeholder="text" v4.7.2+
HTML placeholder attribute to be applied to HTML form text input field.
Default: unset.
size="integer" v4.6.0+
HTML size attribute to be applied to the HTML form text input field.
Default: 25.

Examples

Example 1: Comment form

<p>
    Name (required)<br>
    <txp:comment_name_input />
</p>
<p>
    Email (required)<br>
    <txp:comment_email_input />
</p>
<p>
    Website<br>
    <txp:comment_web_input />
</p>
<p>
    <txp:comment_remember />
</p>
<p>
    Message (required)<br>
    <txp:comment_message_input /><br>
    <txp:comments_help />
</p>
<p>
    <txp:comment_preview />
    <txp:comment_submit />
</p>

Other tags used: comment_email_input, comments_help, comment_message_input, comment_preview, comment_remember, comment_submit, comment_web_input.

Example 2: Minimal comment form without labels (but still accessible)

<p>
    <txp:comment_name_input aria_label="Your name" placeholder="Name"/>
</p>
<p>
    <txp:comment_email_input aria_label="Your email address" placeholder="Email"/>
</p>
<p>
    <txp:comment_web_input aria_label="Your website URL" placeholder="Website (http(s)://)"/>
</p>
<p>
    <txp:comment_message_input aria_label="Your message" placeholder="Your message"/>
</p>
<p>
    <txp:comment_preview />
    <txp:comment_submit />
</p>

Other tags used: comment_email_input, comment_message_input, comment_preview, comment_submit, comment_web_input.

Genealogy

Version 4.7.2

aria_label and placeholder attributes added.

Version 4.6.0

size attribute added (replaces functionality of deprecated isize attribute in comments_form tag).

If you notice any kind of problem with this page's construction or content (outdated information, typos, broken links, or whatever), open an issue to have it sorted. Or have a go at it yourself. :)