FormCreate

Description

Generates arbitrary forms. Submited data can be processed in two different ways:

Note: FormCreate macro should be used together with FormSubmit action plugin.

The following HTML elements are currently supported:

Download & Release Notes

Download

Release Version

Moin Version

Release Notes

macro.zip

2013-03-25

1.9.7

new version from ThomasWaldmann

form_create-1.7.tar.gz

1.7, 1.8

form_create.zip

1.6

See also the repository for the latest version: http://hg.moinmo.in/moin/extensions/summary

Usage

Entire form is generated by sequential execution of multiple form macro plugins. Field generation macros have to be enclosed between FormHeader and FormFooter macro. First parameter of FormHeader macro is action or list of actions to be executed after submiting a form.

FormHeader

Single action:

<<FormHeader(action[,targetfile=][,targetpage=][,targetemail=])>>

Arbitrary action can be executed this way.

Multiple actions:

<<FormHeader(action1, action2, actionN[,targetfile=][,targetpage=][,targetemail=])>>

This option can only be used with FormSubmit action plugin.

Currently supported actions by FormSubmit:

Parameters

FormField

First parameter of each field except FormSubmit is label. Labels are used as header informations in csv files or emails and also as name attribute in HTML tag. Dictionary parameters are used to generate specific HTML attributes. Not all attributes are supported. Next parameters differs in each type of field.

Example

<<FormHeader(submitattachment, submitcsv, submitemail, targetfile=file.csv, targetpage=Page_for_csv_and_attachments, targetemail=email@address.net)>>
|| First name: || <<FormText(First name,maxlength=50)>>                               ||
|| Last name:  || <<FormText(Last name,maxlength=50)>>                                ||
|| Gender:     || Male<<FormRadio(Gender, Male)>> Female<<FormRadio(Gender, Female)>> ||
|| Status:     || <<FormSelect(Status, Single, Married, Divorced)>>                   ||
|| Children:   || <<FormCheckbox(Children, Yes, No)>>                                 ||
|| Note:       || <<FormTextarea(Note, rows=10, cols=20)>>                            ||
|| Attachment: || <<FormUpload(Attachment)>>                                          ||
||<-2:> <<FormSubmit(Send)>>                                                          ||
<<FormFooter()>>

Example shown above generates the following form:

After submission of this form, the following actions are performed:

2008 by Peter Bodi

License

GNU GPL

Bugs

Messages

Hi,

some month ago this library was added to the extension repo at

Improving it there is welcome

ReimarBauer/Photo/img.png -- ReimarBauer 2013-05-30 02:28:24

MoinMoin: MacroMarket/FormCreate (last edited 2013-05-30 02:28:25 by ReimarBauer)