You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by beya! <an...@jibeya.com> on 2004/11/14 18:15:27 UTC
Cocoon forms issue
Hi,
I am in the process of changing my html forms to use CFORMS and was
reading the documentation on the subject at:
http://cocoon.apache.org/2.1/userdocs/forms/sample.html
In the document there is no mention of:
1. What the definition file is called. (definition.xml??????)
I have declared a cform definition file in:
mysite/definition.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<fd:form
xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
>
<fd:widgets>
<fd:field id="name" required="true">
<fd:label>Name:</fd:label>
<fd:datatype base="string"/>
<fd:validation>
<fd:length min="2"/>
</fd:validation>
</fd:field>
....
In my .jx file situated in:
mysite/jx/myForm.jx
I have declared:
<page
xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
xmlns:cinclude="http://apache.org/cocoon/include/1.0"
xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
>
.............
<ft:form-template name="Form1" id="Form1" method="post"
action="#{$continuation/id}.kont">
<ft:widget id="name" />
............
When the page is rendered the form field element is not rendered to the
page, this is because myForm.jx does not know where the declaration.xml
file is. How do I declare in myForm.jx where to find declaration.xml
file?
regards
Andrew
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon forms issue
Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 14 nov. 04, à 19:22, beya! a écrit :
> I have had a look and am still none the wiser. How do I make my form
> page aware of where the cform definition file is???
You mean the form model, right?
Have a look at the src/blocks/forms/samples/flow/registration.js
sample, for example. The connection between the form object and the
model file is done by
var form = new Form("forms/registration.xml");
-Bertrand
Re: Cocoon forms issue
Posted by beya! <an...@jibeya.com>.
On 14 Nov 2004, at 18:01, Bertrand Delacretaz wrote:
> Le 14 nov. 04, à 18:15, beya! a écrit :
>> I am in the process of changing my html forms to use CFORMS and was
>> reading the documentation on the subject...
>
> You might want to have a look at the supersonic tour examples ("tour"
> block), there are a few simple CForms examples that you could use as a
> starting point.
>
> -Bertrand
>
Bertrand,
I have had a look and am still none the wiser. How do I make my form
page aware of where the cform definition file is???
regards
Andrew
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon forms issue
Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 14 nov. 04, à 18:15, beya! a écrit :
> I am in the process of changing my html forms to use CFORMS and was
> reading the documentation on the subject...
You might want to have a look at the supersonic tour examples ("tour"
block), there are a few simple CForms examples that you could use as a
starting point.
-Bertrand