C onvalidating


c onvalidating-71c onvalidating-64

Arbitrary HTML code can be inserted into or extracted from the form using helpers. Since web2py processed the form in the action, it is better to define the form in the action itself. A form is not accepted if it has errors or when it has not been submitted (for example, the first time it is shown).

along with its provided value is displayed at the bottom. Here is how this page looks the first time it is displayed: Here is how it looks upon invalid submission: Here is how it looks upon a valid submission: A shortcut for is a query and uses the same DAL syntax that you use for database queries.

Such a function would be called and passed the form, immediately after validation (if validation passes) and before anything else happens.

This function has multiple purposes: for example, to perform additional checks on the form and eventually add errors to the form, or to compute the values of some fields based on the values of other fields, or to trigger some action (like sending an email) before a record is created/updated.

This can be done: works only with a SQLFORM and not with a FORM.