.. _dijit/form/Form: dijit.form.Form =============== :Status: Draft :Version: 1.0 :Authors: Doug Hays, Bill Keese :Developers: Doug Hays, Bill Keese :Available: since V1.0 .. contents:: :depth: 2 **dijit.form.Form** is the dijit equivalent of the
node, and it provides various methods for serializing/deserializing form data, and checking whether or not a form is valid. ======== Examples ======== Declarative example ------------------- .. cv-compound:: .. cv:: javascript .. cv:: html
Note that it's using a
node instead of the obvious choice of a node because of some `IE issues `_ Preparing and validating a form for XHR requests ------------------------------------------------ To validate a form you use the `isValid()` function. Lets take at a simple example using a declaratively created form: .. cv-compound:: .. cv:: javascript .. cv:: html
Using native form elements -------------------------- dijit.form.Form can also handle any type of native form element, though you have to do validation yourself. The Form widget below will validate only when you have entered both a name in the ValidationTextBox widget AND when you have selected 1 of the native HTML radio buttons. .. cv-compound:: .. cv:: javascript .. cv:: html
Food Drinks
============= Accessibility ============= The Form widget acts as a container for other widgets and HTML elements and has no specific behaviors affecting accessibility.