PmWiki is a wiki-based system for collaborative creation and maintenance of websites.
PmWiki pages look and act like normal web pages, except they have an "Edit" link that makes it easy to modify existing pages and add new pages into the website, using basic editing rules. You do not need to know or use any HTML or CSS. Page editing can be left open to the public or restricted to small groups of authors.
Key PmWiki Features
Custom look-and-feel: A site administrator can quickly change the appearance and functions of a PmWiki site by using different
skins and HTML templates. If you can't find an appropriate skin
already made, you can easily modify one or create your own.
Access control: PmWiki password protection can be applied to an entire site, to groups of pages, or to individual pages. Password protection controls who can read pages, edit pages, and upload attachments. PmWiki's access control system is completely self-contained, but it can also work in conjunction with existing password databases, such as
.htaccess, LDAP servers, and MySQL databases.
Customization and plugin architecture: One principle of the
PmWikiPhilosophy is to only include essential features in the core engine, but make it easy for administrators to customize and add new markup. Hundreds of features are already available by using extensions (called "recipes") that are available from the PmWiki
Cookbook.
PmWiki is written in PHP and distributed under the General Public License. It is designed to be simple to install, customize, and maintain for a variety of applications. This site is running pmwiki-2.2.11.
PmWiki is a registered trademark of Patrick R. Michaud.
PmWiki's home on the web is at pmwiki.org.
This page explains how you can embed input forms into wiki pages.
Input forms don't actually handle processing of the form data -- the feature simply allows creation of forms inside wiki pages. Forms processing can be found in the Cookbook (see below).
Markup
Two directives are used to begin and end forms:
(:input form "url" method:)
...
(:input end:)
The (:input form:)
directive starts a form that will post to url using the supplied method. The url must be in quotes. If the url is omitted, then the current page is assumed. If method is omitted then "POST" is assumed. An optional name="FormName"
argument can be used to name the form. The (:input end:)
directive ends the current form.
Note that this feature doesn't ensure that the form output is correct HTML -- it assumes the author knows a little bit of what he or she is doing. Notably, (:input form:) and (:input end:) shouldn't appear inside tables, and all form fields and controls should be inside an (:input form:)...(:input end:) block.
Standard input controls
The standard input controls are:
(:input text name value size=n:)
(:input hidden name value:)
(:input password name value:)
(:input radio name value:)
(:input checkbox name value:)
(:input select name value label:)
(:input default default-name default-value:)
(:input submit name value:)
(:input textarea name [=value=]
rows=n cols=n:)
(:input reset name label:)
(:input file name label:)
(:input image name "src" alt:)
Where name and value are in the HTML syntax: name="addr" value="808 W Franklin".
For most controls the markup has the form:
(:input type name value parameter=value:)
where type is the type of input element (described below), name is the name of the control, value is its initial value, and parameters are used to specify additional attributes to the control. If value contains spaces, enclose it in quotes; if it contains newlines (for textarea and hidden elements), enclose it in [=...=]
.
For example, the following creates a text input control with a size of 30 characters:
For convenience, an author can also specify name and value arguments directly using name=
and value=
attributes (same as HTML):
For the textarea
control a value can be set from PmWiki 2.2.0beta45 onwards. Enclose the value in [=...=]
if it contains spaces or new lines.
The submit
control will more often be written as:
(:input submit value=label:)
Here's a more complete example, e.g., for a login prompt:
(:input form "http://www.example.com":)
(:input hidden action login:)
|| Name:||(:input text username:) ||
|| Password:||(:input password password:)||
|| ||(:input submit value="Log In":) ||
(:input end:)
|
|
(:input select ... :)
The basic form of a select box is a sequence of options:
(:input form:)
(:input select name=abc value=1 label=alpha :)
(:input select name=abc value=2 label=beta :)
(:input select name=abc value=3 label=gamma :)
(:input submit:)
(:input end:)
|
|
The values can be specified positionally:
(:input select abc 1 alpha :)
We can specify the size of the selection box:
(:input select abc 1 alpha size=3 :)
You can specify a multiple select box:
(:input select abc 1 alpha size=3 multiple:)
To have an element selected, use selected=selected
:
(:input select abc 2 beta selected=selected:)
Note that to have two select boxes inline, not only should you give them different name=
parameters, but also place a separator, like a character,
or even the null sequence [==]
between them:
(:input form:)
(:input select name=FIRST value=1:)(:input select name=FIRST value=2:)[==]
(:input select name=SECOND value=3:)(:input select name=SECOND value=4:)
(:input end:)
|
|
See Also
Compatible recipes:
PmWiki is a wiki-based system for collaborative creation and maintenance of websites.
PmWiki pages look and act like normal web pages, except they have an "Edit" link that makes it easy to modify existing pages and add new pages into the website, using basic editing rules. You do not need to know or use any HTML or CSS. Page editing can be left open to the public or restricted to small groups of authors.
Key PmWiki Features
Custom look-and-feel: A site administrator can quickly change the appearance and functions of a PmWiki site by using different
skins and HTML templates. If you can't find an appropriate skin
already made, you can easily modify one or create your own.
Access control: PmWiki password protection can be applied to an entire site, to groups of pages, or to individual pages. Password protection controls who can read pages, edit pages, and upload attachments. PmWiki's access control system is completely self-contained, but it can also work in conjunction with existing password databases, such as
.htaccess, LDAP servers, and MySQL databases.
Customization and plugin architecture: One principle of the
PmWikiPhilosophy is to only include essential features in the core engine, but make it easy for administrators to customize and add new markup. Hundreds of features are already available by using extensions (called "recipes") that are available from the PmWiki
Cookbook.
PmWiki is written in PHP and distributed under the General Public License. It is designed to be simple to install, customize, and maintain for a variety of applications. This site is running pmwiki-2.2.11.
PmWiki is a registered trademark of Patrick R. Michaud.
PmWiki's home on the web is at pmwiki.org.