Gizmo Form

The Gizmo Form module supports redundant client-side field validation as well as an additional json callback for a field (when the field’s validation logic requires server-side business logic or data). Under Gizmo Form, all QP Form and QP Widget instances become also gizmos, while retaining all of their QP-ness, to facilitate a richer client-side behaviour. A by-product of Gizmo Form is a simplified JavaScript version of the spec generic python validation module.

An example

The demo registration form is a prepared simple example of a Gizmo Form, demonstrating:

  • the behaviour of the form — try filling out all the required fields, and in particular the Username
  • the server-side definition in python of the form (the source is inlined in the page for convenience)
  • the resulting automatically generated client-side javascript code (do view page source) — client-side validation tests are redunadant, as every one of them is guaranteed to be also performed on the server every time the form is submitted.

More Information