Quick links: Content - sections - sub sections
EN

Trace:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:tutorials:simple-jforms-example [2008/03/05 09:33] laurenten:tutorials:simple-jforms-example [2008/11/19 15:02] – external edit 127.0.0.1
Line 16: Line 16:
 </code> </code>
  
-Don't forget to change rights on ''<jelix folder>/temp/myapp/''. This will allow your web server to create files in this directory. ([[en:manual:installation|see installation manual]]).+Don't forget to change rights on ''<jelix folder>/temp/myapp/''. This will allow your web server to create files in this directory. ([[en:manual-1.0:installation|see installation manual]]).
  
 An application skeleton is created. Your local tree structure should look like: An application skeleton is created. Your local tree structure should look like:
Line 52: Line 52:
 <code xml> <code xml>
  <?xml version="1.0" encoding="utf-8"?>  <?xml version="1.0" encoding="utf-8"?>
- <forms xmlns="http://jelix.org/ns/forms/1.0">+ <form xmlns="http://jelix.org/ns/forms/1.0">
    
    <menulist ref="title">    <menulist ref="title">
Line 75: Line 75:
      <label>Contact us</label>      <label>Contact us</label>
    </submit>    </submit>
-  </forms>+  </form>
 </code> </code>
  
Line 201: Line 201:
  
 {{en:tutorials:simple-forms-example-2.png}} {{en:tutorials:simple-forms-example-2.png}}
 +
  
  
Line 216: Line 217:
         $f = jForms::fill("myapp~contact");         $f = jForms::fill("myapp~contact");
         if(!$f || !$f->check()) {         if(!$f || !$f->check()) {
-            $rep = $this->getResponse('redirect'); +            $view = $this->getResponse('redirect'); 
-            $rep->action="myapp~default:index"; +            $view->action="myapp~default:index"; 
-            return $rep;+            return $view;
         }         }
    
Line 270: Line 271:
  
 {{en:tutorials:simple-forms-example-3.png}} {{en:tutorials:simple-forms-example-3.png}}
 +
 +
  
  
Line 291: Line 294:
   * create your own form "builder" (soon in jelix 1.1), so plugins could displays the form, not in HTML, but in other format like Xforms, XUL, or in HTML + your prefered ajax library.   * create your own form "builder" (soon in jelix 1.1), so plugins could displays the form, not in HTML, but in other format like Xforms, XUL, or in HTML + your prefered ajax library.
   * 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
Line 297: Line 301:
   * 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: **<textarea>**, **<listbox>**, **<checkbox>**, **<checkboxes>**, **<radiobuttons>**, **<reset>**,   **<secret>**, **<secret>**+confirmation, **<upload>**   * and many other controls are availabled: **<textarea>**, **<listbox>**, **<checkbox>**, **<checkboxes>**, **<radiobuttons>**, **<reset>**,   **<secret>**, **<secret>**+confirmation, **<upload>**
-  * some others will be available soon:  **<htmleditor>** **<hidden>** etc.+  * some others will be available soon in Jelix 1.1 :  **<htmleditor>** **<hidden>** **<captcha>** (already in 1.1a1pre) etc.
  
  

en/tutorials/simple-jforms-example.txt · Last modified: 2012/12/06 20:38 by laurent

Recent changes RSS feed Creative Commons License