|
Main page About News Recent Changes WikiEtiquette Find pages
Set your name in
UserPreferences Referenced by
JSPWiki v2.2.14-beta
|
WikiForms Form Plugin ExampleThis page uses the WikiForms plugins to provide parameters to the CurrentTimePlugin, and displays the result. Table of ContentsGiving DefaultsThe first item, hidden in normal WikiPage viewing, looks like this:
[{FormSet form='testform' format='EEE, d MMM yyyy HH:mm:ss Z' rd1='r2'}]
The FormSet plugin sets the default date format for a form field format in form testform. (It also sets a radio button default value - just for demonstration, no real functionality.) Form Output and Error MessagesThe second item, also hidden, looks like this:
[{FormOutput form='testform' handler='CurrentTimePlugin' populate='handler'}]
It specifies that the CurrentTimePlugin, which comes in the stock JSPWiki distribution, should be used to generate some output to display here. While the output is usually built in response to a POST from a form called testform, the populate attribute here hints the plugin that we want default information even if no post has been made. This is what the output looks like:
Thu, 17 May 2012 06:23:23 +0300
Opening the FormThe third element starts the actual HTML form called testform:
[{FormOpen form='testform'}]
Go ahead, click on Update, and notice how your format changes and selections are retained. Synopsis:
|