Section: jForms file format
^ jForms: automatic forms | Initializing a form » |
jForms automatically generates forms described in an XML dialect. Every form is described in an XML file, using a simple grammar between say HTML and XForms.
Those XML files reside in forms
folder of modules and must follow this name scheme foo.form.xml
. foo
is the identifier of the form. You choose it of course. This identifier is later used in selectors and through jForms API.
Example: "myModule~product" refers to myModule/forms/product.form.xml
.
The XML grammar of jForms evolves at each new version of Jelix, so there are several versions of this grammar. However, jelix always supports old grammar version, since each version has its own namespace. So it is very easy to migrate an application from an old version of Jelix to a newer one: you don't have nothing to do for jForms file.
jForms XML dialect evolves between Jelix version. Currently, there are two versions for it (1.0
and 1.1
). To ensure backward compatibility, Jelix 1.1 supports the new and old versions, so you don't have to migrate your old-formatted jForms XML file.
Since each version of the format has its own namespace, be careful to indicate the right namespace in the file. Here are the documentation for each version of the format.