Trace:
Differences ¶
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
en:tutorials:simple-jforms-example [2008/03/04 15:09] – laurent | en:tutorials:simple-jforms-example [2008/07/20 00:05] – bastnic | ||
---|---|---|---|
Line 52: | Line 52: | ||
<code xml> | <code xml> | ||
<? | <? | ||
- | <forms xmlns=" | + | <form xmlns=" |
< | < | ||
Line 79: | Line 79: | ||
You can see that it is a declarative format. It is easy to read and edit. | You can see that it is a declarative format. It is easy to read and edit. | ||
+ | |||
Line 95: | Line 96: | ||
$f = jForms:: | $f = jForms:: | ||
- | $view->tpl-> | + | $view->body-> |
return $view; | return $view; | ||
Line 200: | Line 201: | ||
{{en: | {{en: | ||
+ | |||
+ | |||
Line 214: | Line 217: | ||
$f = jForms:: | $f = jForms:: | ||
if(!$f || !$f-> | if(!$f || !$f-> | ||
- | $rep = $this-> | + | $view = $this-> |
- | $rep-> | + | $view-> |
- | return $rep; | + | return $view; |
} | } | ||
Line 241: | Line 244: | ||
$alldatas = $f-> | $alldatas = $f-> | ||
+ | // or | ||
$firstname = $f-> | $firstname = $f-> | ||
- | if ($firstname==' | + | if ($firstname==' |
// and so on. | // and so on. | ||
</ | </ | ||
Line 267: | Line 271: | ||
{{en: | {{en: | ||
+ | |||
+ | |||
+ | |||
+ | |||
Line 279: | Line 287: | ||
* validate submitted data (this is done automatically !) | * validate submitted data (this is done automatically !) | ||
* display the form again with errors | * display the form again with errors | ||
+ | |||
+ | With only one xml file and few lines of code ! | ||
And jForms has many other features, such as : | And jForms has many other features, such as : | ||
- | * create your own form " | + | * create your own form " |
* specify your own error messages | * specify your own error messages | ||
+ | * localize everything | ||
* manage how error messages are displayed | * manage how error messages are displayed | ||
* display helps and tooltips | * display helps and tooltips | ||
- | * fill menulist, listbox, (adn so on) automatically, | + | * fill menulist, listbox, (and so on) choices |
- | * store data automatically still using a jDao object | + | * read and store data automatically still using a jDao object |
* create quickly a CRUD controller, by using the jControllerDaoCrud controller (only indicate a jforms file, a jdao file, and that's all !) | * create quickly a CRUD controller, by using the jControllerDaoCrud controller (only indicate a jforms file, a jdao file, and that's all !) | ||
* and many other controls are availabled: **< | * and many other controls are availabled: **< | ||
- | * some others will be available soon: **< | + | * some others will be available soon in Jelix 1.1 : **< |