Comments preview

On this page:


<txp:comments_preview />

The comments_preview tag can be used as a single tag or a container tag and is used to display a preview of a visitor’s comment.


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

form="form name"
Use specified form template to process each comment.
Default: comments.
label="text" v4.6.0+
Label that appears on the ‘Preview’ button.
Default: Preview (localized).

Common presentational attributes

These attributes, which affect presentation, are shared by many tags. Note that default values can vary among tags.

class="class name"
HTML class to apply to the wraptag attribute value.
Default: comments_preview (see class cross-reference).
HTML tag to wrap around the list, specified without brackets (e.g. wraptag="div").
Default: depends upon ‘Present Comments as a Numbered List?’ preference setting - either ol or unset (but see wraptag cross-reference for exceptions).


Example 1: Show comment preview appended to end of current comments list

<txp:comments wraptag="ol" break="li" />
        <p>This is a preview of what your comment will look like. Please don’t forget to scroll down and actually press the ‘submit’ button!</p>
        <txp:comments_preview wraptag="" />

Other tags used: comments, if_comments_preview.


Version 4.6.0

Can be used as a container tag.
label attribute added (replaces functionality of deprecated previewlabel attribute in comments_form tag).

Version 4.0.4

Use is necessary in comments display form (<comments_display />, by default).

Version 4.0.3

Tag support added.

See something wrong in this document? Outdated info, a broken link, faulty code example, or whatever? Please open an issue and we’ll investigate.