Password form field : Form « Components « Flex






Password form field

Password form field
           


<!--
Code from Flex 4 Documentation "Using Adobe Flex 4".

This user guide is licensed for use under the terms of the Creative Commons Attribution 
Non-Commercial 3.0 License. 

This License allows users to copy, distribute, and transmit the user guide for noncommercial 
purposes only so long as 
  (1) proper attribution to Adobe is given as the owner of the user guide; and 
  (2) any reuse or distribution of the user guide contains a notice that use of the user guide is governed by these terms. 
The best way to provide notice is to include the following link. 
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/

-->



<!-- containers\intro\ContainerDefaultB.mxml -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:s="library://ns.adobe.com/flex/spark">
    <s:layout>
        <s:VerticalLayout />
    </s:layout>
    <fx:Script>
         
        public function submitLogin():void { 
            text1.text="You just tried to log in."; 
        } 
      
    </fx:Script>
    <s:Panel title="Default Button Example">
        <mx:Form defaultButton="{mySubmitBtn}">
            <mx:FormItem label="Username:">
                <s:TextInput id="username" width="100" />
            </mx:FormItem>
            <mx:FormItem label="Password:">
                <s:TextInput id="password" width="100"
                    displayAsPassword="true" />
            </mx:FormItem>
            <mx:FormItem>
                <s:Button id="mySubmitBtn" label="Login"
                    click="submitLogin();" />
            </mx:FormItem>
        </mx:Form>
    </s:Panel>
    <s:Label id="text1" width="150" />
</s:Application>

   
    
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Making use of form-related containersMaking use of form-related containers
2.Form Radio button groupForm Radio button group
3.Login form and get password back formLogin form and get password back form
4.Add submitForm() and debugMessage() functions as click event handlersAdd submitForm() and debugMessage() functions as click event handlers
5.Register the submitForm() and debugMessage() handler functions with b1's click eventRegister the submitForm() and debugMessage() handler functions with b1's click event
6.Clear form fieldsClear form fields
7.Form item labelForm item label
8.Empty form tag
9.FormHeading controlFormHeading control
10.A form for first name, last name, address, city, zip code and countryA form for first name, last name, address, city, zip code and country
11.Form Text required fieldForm Text required field
12.submit function can access the form control data directlysubmit function can access the form control data directly
13.Populating a Form control from a data modelPopulating a Form control from a data model
14.Switch form with TransitionSwitch form with Transition
15.Form control barForm control bar
16.Form field with LabelForm field with Label
17.Add the submitForm() and debugMessage() functions as handlers of the click event:Add the submitForm() and debugMessage() functions as handlers of the click event:
18.Register the submitForm() and debugMessage() handler functionsRegister the submitForm() and debugMessage() handler functions
19.Add form header to a formAdd form header to a form
20.Bind form input control to ModelBind form input control to Model
21.Form label with iconForm label with icon
22.One form two FormHeadingsOne form two FormHeadings
23.Model data and form controls
24.Contact Editor FormContact Editor Form
25.Travel formTravel form
26.Form with ControlBarForm with ControlBar
27.Form Multiple HeadingsForm Multiple Headings
28.Adding border to FormAdding border to Form
29.defines the FormHeading controldefines the FormHeading control
30.Using Form controls to hold your form dataUsing Form controls to hold your form data
31.The submit function can access the form control data directly,The submit function can access the form control data directly,
32.Form Data Model ValueForm Data Model Value
33.A form that reads static data from a data model to obtain the value for a form fieldA form that reads static data from a data model to obtain the value for a form field
34.Adding a load event and a fault event to the form.Adding a load event and a fault event to the form.
35.Select a value for the formatString property from the drop-down listSelect a value for the formatString property from the drop-down list
36.Show individual times for the initialization and creation of each form element.Show individual times for the initialization and creation of each form element.
37.Register a single listener function, submitForm(), with two different buttonsRegister a single listener function, submitForm(), with two different buttons
38.Form ButtonForm Button
39.Form default buttonForm default button
40.The form and the buttons overlap as the application grows smaller, for example.The form and the buttons overlap as the application grows smaller, for example.
41.Form with ButtonForm with Button
42.Login ExampleLogin Example
43.Checking the box could make the user e-mail field requiredChecking the box could make the user e-mail field required