1.1 --- a/pages/HelpOnMoinForms Sat Feb 09 19:50:37 2013 +0100
1.2 +++ b/pages/HelpOnMoinForms Sat Feb 09 19:55:38 2013 +0100
1.3 @@ -14,7 +14,7 @@
1.4 To embed a form within a page, a special region must be declared as in the following example:
1.5
1.6 {{{{
1.7 -{{{#!form fragment=exampleform
1.8 +{{{#!form fragment=exampleform finishing=finish
1.9
1.10 || '''Name''' || <<FormField(name,ExampleFormDict)>> ||
1.11 || '''Address''' || <<FormField(address,ExampleFormDict)>> ||
1.12 @@ -34,7 +34,7 @@
1.13
1.14 The above form definition produces the following form:
1.15
1.16 -{{{#!form fragment=exampleform
1.17 +{{{#!form fragment=exampleform finishing=finish
1.18
1.19 || '''Name''' || <<FormField(name,ExampleFormDict)>> ||
1.20 || '''Address''' || <<FormField(address,ExampleFormDict)>> ||
1.21 @@ -52,17 +52,17 @@
1.22 === Defining Form Regions ===
1.23
1.24 {{{{
1.25 -{{{#!form fragment=<fragment> action=<action>
1.26 +{{{#!form fragment=<fragment> action=<action> finishing=<field>[,<field>...]
1.27 ...
1.28 }}}
1.29 }}}}
1.30
1.31 -Form regions must be defined using the special `#!form` notation and should provide a `fragment` identifier that uniquely identifies the form on the page, along with an `action` identifier indicating which action should be used to interpret and process the form data. If the `action` argument is missing, the default `MoinFormHandlerAction` is used.
1.32 +Form regions must be defined using the special `#!form` notation and should provide a `fragment` identifier that uniquely identifies the form on the page, along with an `action` identifier indicating which action should be used to interpret and process the form data. If the `action` argument is missing, the default `MoinFormHandlerAction` is used. The `finishing` argument should list field names separated by commas that cause a validated form to be finished and thus stored (in the default action).
1.33
1.34 Normal Wiki markup can be used within form regions, but care must be taken to ensure that where other regions are embedded within form regions, the number of brackets used to declare the outer regions is greater than the number used to declare the embedded regions. This technique is described on the HelpOnParsers page, but is also illustrated below.
1.35
1.36 {{{{{
1.37 -{{{{#!form fragment=exampleform action=ExampleAction
1.38 +{{{{#!form fragment=exampleform action=ExampleAction finishing=finish
1.39
1.40 Fill out the form below:
1.41
1.42 @@ -127,7 +127,7 @@
1.43 Some kinds of forms require collections of fields that may be optional or repeating and that may be logically grouped. Form sections permit fields to be declared within their own namespace or group such that they may be collectively added, removed or replicated. For example:
1.44
1.45 {{{{{
1.46 -{{{{#!form fragment=exampleform2
1.47 +{{{{#!form fragment=exampleform2 finishing=finish
1.48
1.49 || '''Name''' || <<FormField(name,ExampleFormDict)>> ||
1.50 || '''Address''' || <<FormField(address,ExampleFormDict)>> ||
1.51 @@ -144,7 +144,7 @@
1.52
1.53 This produces the following form:
1.54
1.55 -{{{{#!form fragment=exampleform2
1.56 +{{{{#!form fragment=exampleform2 finishing=finish
1.57
1.58 || '''Name''' || <<FormField(name,ExampleFormDict)>> ||
1.59 || '''Address''' || <<FormField(address,ExampleFormDict)>> ||
1.60 @@ -172,7 +172,7 @@
1.61 Message sections are introduced in forms like normal sections but using the `message` argument in the form region's declaration. For example:
1.62
1.63 {{{{{
1.64 -{{{{#!form fragment=exampleform3
1.65 +{{{{#!form fragment=exampleform3 finishing=finish
1.66
1.67 || '''Name''' || <<FormField(name,ExampleFormDict)>> ||
1.68 {{{#!form message=name-error
1.69 @@ -186,7 +186,7 @@
1.70
1.71 The form described above should look like this:
1.72
1.73 -{{{{#!form fragment=exampleform3
1.74 +{{{{#!form fragment=exampleform3 finishing=finish
1.75
1.76 || '''Name''' || <<FormField(name,ExampleFormDict)>> ||
1.77 {{{#!form message=name-error
1.78 @@ -206,7 +206,7 @@
1.79 Each field can potentially have many errors associated with it and stored in a separate error field. To be able to show all the errors, as opposed to only the first one, a `repeating` argument can be specified in the declaration of the message section. For example:
1.80
1.81 {{{{{
1.82 -{{{{#!form fragment=exampleform4
1.83 +{{{{#!form fragment=exampleform4 finishing=finish
1.84
1.85 || '''Name''' || <<FormField(name,ExampleFormDict)>> ||
1.86 {{{#!form message=name-error repeating
1.87 @@ -220,7 +220,7 @@
1.88
1.89 The form described above should look like this:
1.90
1.91 -{{{{#!form fragment=exampleform4
1.92 +{{{{#!form fragment=exampleform4 finishing=finish
1.93
1.94 || '''Name''' || <<FormField(name,ExampleFormDict)>> ||
1.95 {{{#!form message=name-error repeating