Tags:
forms1Add my vote for this tag create new tag
view all tags

HtmlFormsPlugin

ALERT! NOTE: This plugin is no longer maintained. It is replaced by the FormPlugin

This plugin can be used to make html forms that set TWikiVariables. SELECT, CHECKBOX and RADIO can be used to select from a comma separated list of options (that could be defined using a SEARCH), while BUTTON, TEXTVALUE and TEXTAREA will set the TWikiVariable based on the value.

I will be using SELECT to allow the user to set a variable to a set of topics, which they will later publish to a web site using TWiki:Plugins/PublishContrib.

Syntax Rules

  • %CHECKBOX{}%
  • %RADIO{}%
  • %SELECT{}%
    • options="" - the comma separated list of options, or VARIABLE containing or resulting in such a list (SEARCH is valid)
    • currentvalue="" - single value, or comma separated list of values as appropriate
    • destinationaddress="Web.Topic.VARIABLENAME" (and where Web & Topic can be left out for the usual context driven locations
  • %TEXTVALUE{}%
  • %TEXTAREA{}%
  • %BUTTON{}%
    • value="" - the value to set the destination to
    • destinationaddress="Web.Topic.VARIABLENAME" (and where Web & Topic can be left out for the usual context driven locations

future development

  • the addressing scheme is going to change to be XPathy
  • make all buttons submit all changes - just like inline edit!!
  • %FORMVALUES{"Web.FormDefinitionTopic.FormfieldName"}% - returns a comma separated list of options defined for that form field
  • later make a TOM like destination and source value syntax to get values from text, formfields etc

Examples

select multiple values from a scrolling selection list, and set WHOWILLITBENOW in Sandbox.WebHome topic

%SELECT{options="mary, peter, annabel, nicky, jennifer" currentvalue="%WHOWILLITBENOW%" destinationaddress="Sandbox.WebHome.WHOWILLITBENOW"}%

if installed

%SELECT{options="mary, peter, annabel, nicky, jennifer" currentvalue="annabel, jennifer, bananaman" destinationaddress="Sandbox.WebHome.WHOWILLITBENOW"}%

demo


select multiple values from a checkbox group list, and set WHOWILLITBENOW in this topic

%CHECKBOX{options="mary, peter, annabel, nicky, jennifer" currentvalue="%WHOWILLITBENOW%" destinationaddress="WHOWILLITBENOW"}%

if installed

%CHECKBOX{options="mary, peter, annabel, nicky, jennifer" currentvalue="annabel, jennifer, bananaman" destinationaddress="WHOWILLITBENOW"}%

demo








select one value from a radio selector list, and set WHOWILLITBENOW in this topic

%RADIO{options="mary, peter, annabel, nicky, jennifer" currentvalue="%WHOWILLITBENOW%" destinationaddress="WHOWILLITBENOW"}%

if installed

%RADIO{options="mary, peter, annabel, nicky, jennifer" currentvalue="annabel, jennifer, bananaman" destinationaddress="WHOWILLITBENOW"}%

demo








use a single line text edit, and set WHOWILLITBENOWTEXT in this topic

%TEXTVALUE{value="There once was a girl" destinationaddress="WHOWILLITBENOWTEXT"}%

if installed

%TEXTVALUE{value="There once was a girl" destinationaddress="WHOWILLITBENOWTEXT"}%

demo


use a multi line text edit, and set WHOWILLITBENOWTEXT in this topic

%TEXTAREA{value="There once was a girl" destinationaddress="WHOWILLITBENOWTEXT"}%

if installed

%TEXTAREA{value="There once was a girl" destinationaddress="WHOWILLITBENOWTEXT"}%

demo


and set WHOWILLITBENOWTEXT in this topic to "There once was a girl"

%BUTTON{value="There once was a girl" destinationaddress="WHOWILLITBENOWTEXT"}%

if installed

%BUTTON{value="There once was a girl" destinationaddress="WHOWILLITBENOWTEXT"}%

demo


Plugin Installation Instructions

Plugin Info

Plugin Author: TWiki:Main.SvenDowideit
Copyright: © 2006, SvenDowideit@WikiRingPLEASENOSPAM.com
License: GPL2 (GNU General Public License)
Plugin Version: September 2006
Change History:  
September 2006: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.1
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
TWiki:Plugins/Benchmark: GoodStyle 99%, FormattedSearch 99%, HtmlFormsPlugin 99%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/HtmlFormsPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/HtmlFormsPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/HtmlFormsPluginAppraisal

Related Topics: TWikiPlugins, DeveloperDocumentationCategory, AdminDocumentationCategory, TWikiPreferences

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 HtmlFormsPlugin.md5 r4 r3 r2 r1 manage 0.2 K 2008-12-12 - 11:35 SopanShewale checksum file , Uploaded as a part of Release Process
Compressed Zip archivetgz HtmlFormsPlugin.tgz r5 r4 r3 r2 r1 manage 10.7 K 2008-12-12 - 11:35 SopanShewale See HtmlFormsPlugin for details. Untar and run the installer script, Uploaded as a part of Release Process
Compressed Zip archivezip HtmlFormsPlugin.zip r5 r4 r3 r2 r1 manage 12.5 K 2008-12-12 - 11:35 SopanShewale See HtmlFormsPlugin for details. Unzip and run the installer script , Uploaded as a part of Release Process
Unknown file formatext HtmlFormsPlugin_installer r2 r1 manage 3.4 K 2008-12-12 - 11:35 SopanShewale Installer Script, Uploaded as a part of Release Process
Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r11 - 2011-03-13 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.