Creating mandatory FormItems : FormItem « Components « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Components » FormItemScreenshots 
Creating mandatory FormItems
Creating mandatory FormItems
          
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
             
    <mx:StringValidator id="nameV"
        source="{nameTxt}"
        property="text"
        required="true"/>

    <mx:Validator id="surnameV"
         required="true" 
         source="{surnameTxt}" 
         property="text"
         requiredFieldError="Your Surname is a required field." />

        
    <mx:Form id="myForm">
        <mx:FormItem label="Insert Name" required="true">
            <mx:TextInput id="nameTxt"  />
        </mx:FormItem>
        
        <mx:FormItem label="Insert Surname" required="true">
            <mx:TextInput id="surnameTxt" />
        </mx:FormItem>
        
    </mx:Form>
    
</mx:Application>

   
    
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Label for FormItemLabel for FormItem
2.CheckBox FormItemCheckBox FormItem
3.Layout FormItem horizontallyLayout FormItem horizontally
4.FormItem containers take an input control and provide it with a labelFormItem containers take an input control and provide it with a label
5.FormItem font style and weightFormItem font style and weight
6.Set the FormItem label color to dark blue and its font size to 20 pixelsSet the FormItem label color to dark blue and its font size to 20 pixels
7.Show the FormItem container definitionsShow the FormItem container definitions
w__w_w__.___j_a___v___a__2_s_.___co___m___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.