From Textpattern CMS User Documentation


Forms are one of the six "building blocks" described in the Textpattern Semantic Model. The Forms panel contains a Form editor, with a list of existing Forms organized in the right column and a Tag builder in the left column to help you construct Form content.

Creating a New Form

To create a new Form, click the Create new form button at the top of the right column. The Form editor will be empty. Before working on the Form content right away, it's best to first give it an unique name, assign a Form type and save it, all using the controls under the Form editor.

You can then go back to editing the Form's content, either by hand, or by pasting in some starter code from an existing Form and editing it as needed. Be sure to save your changes as you progress to not risk losing anything.

All Forms need to have unique names and a Form type association before saving them. should classify it according to the kind of Form it will be. There are seven form types: article, category, comment, file, link, misc (miscellaneous), and section. The form type you use is not vitally important, the purpose of assigning forms a type is to allow Textpattern's tag builder to help you easily find the form you want to use. Once you've named and classified your form, you can begin building it.

Form Types Explained

When creating a form, it must be assigned to a "Type," which is available via a dropdown selection box under the Name field. There are currently seven form types: article, category, comment, file, link, misc (miscellaneous), and section.

Form types have almost no inherent semantic but aid solely as a means of organization for the designer/user. One notable exception: article type forms are the only ones listed in the override form dropdown on the write screen.

The category and section types are intended to be used in conjunction with category_list and section_list, respectively, as a value to the form attribute, along the lines of <txp:section_list form="foo" />. They serve the same use case as the form attributes for articles do.

See also:

Translations [?]