Solprovider Lenya Kongregate Registration for Free Flash Games and Chat with solprovider

Flow Presentation

The filename is specified by a line in the JavaScript:
var form = new Form("flow/myFlowFunction/form.xml");
It assumes it is starting from the directory of the XMAP file, typically kept in {pub}.

XML Field Definitions


<?xml version="1.0"?>
<page xmlns:ft="http://apache.org/cocoon/forms/1.0#template" xmlns:fi="http://apache.org/cocoon/forms/1.0#instance" xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
<title>Registration Information</title>
<content>
<div class="title"><i18n:text>New Registration</i18n:text></div>
<ft:form-template action="#{$continuation/id}.more?lenya.usecase=myUsecase" method="POST">
<fi:group>
<fi:styling layout="columns"/>
<fi:items>
<ft:widget id="messages"/>
<ft:widget id="name"/>
<ft:widget id="email"/>
<ft:widget id="password">
<fi:styling type="password"/>
</ft:widget>
<ft:widget id="confirmPassword">
<fi:styling type="password"/>
</ft:widget>
<ft:widget id="selectionField1"/>
<ft:widget id="selectionField2"/><BR/>
<ft:widget id="dynamicSelectionField"/>
<BR/><input i18n:attr="value" type="submit" value="Register"/>
</fi:items>
</fi:group>
</ft:form-template>
</content>
</page>

Explanation


<ft:form-template action="#{$continuation/id}.more?lenya.usecase=myUsecase" method="POST">
tells the form how to return.

<title>Registration Information</title>
is used by XSL to change the HTML HEADER TITLE.

Used i18n for the title displayed on the page.

<fi:group><fi:styling layout="columns"/>
tells Lenya to put the items in this group into a 2-column table with labels in the left column and the fields in the right column. There are other formats.

Messages, Name, Email, selectionField1, and selectionField2 require no additional parameters.
Password and confirmPassword are password fields: all characters typed appear as asterisks '*'.
dynamicSelectionField will display as checkboxes (rather than the boolean field defaulting to radio buttons.)

Extra "<BR/>" were added to leave blank lines.

<input i18n:attr="value" type="submit" value="Register"/>
is the Submit button. Notice that the value attribute is using i18n, so "Register" must be added to the language files. For my publication, I made the button display in the second column, but that required programming elsewhere.


<< Fieldsi18n Messages >>

Contact Solprovider
Paul Ercolino