Follow Flex After Dark on Twitter

Flex Forms

Forms in Flex are supported through special container classes that assist in laying out label and input elements. The form container classes are found in the mx.containers package.

Form

A Form is made of the following components:

  • The outer Form container
  • One or more FormItems, each containing one or more input elements
  • Zero or more FormHeadings

TODO: Embed example here...

   <mx:Form id="frmContact">
      
      <mx:FormHeading label="Contact Information"/>
      
      <mx:FormItem label="First Name:" required="true">
         <mx:TextInput id="txtFirstName"/>
      </mx:FormItem>
      
      <mx:FormItem label="Last Name:" required="true">
         <mx:TextInput id="txtLastName"/>
      </mx:FormItem>
      
      <mx:FormItem label="Email Address:" required="false">
         <mx:TextInput id="txtEmailAddress"/>
      </mx:FormItem>
      
   </mx:Form>

Random Notes:

  • The FormItem's required property (if true) puts a visual element (red asterik) by the form field to signify it is required. It will not force form validation (see below).

Form Validation

Read more about Form Validation...

Related Links:

Related Docs
Recent Docs
Random Docs