Using data binding with data models
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Model id="reg"> <registration> <name>{fullname.text}</name> <email>{email.text}</email> <phone>{phone.text}</phone> <zip>{zip.text}</zip> <ssn>{ssn.text}</ssn> </registration> </mx:Model> <mx:Form> <mx:FormItem label="Name" required="true"> <mx:TextInput id="fullname" width="200" /> </mx:FormItem> <mx:FormItem label="Email" required="true"> <mx:TextInput id="email" width="200" /> </mx:FormItem> <mx:FormItem label="Phone" required="true"> <mx:TextInput id="phone" width="200" /> </mx:FormItem> <mx:FormItem label="Zip" required="true"> <mx:TextInput id="zip" width="60" /> </mx:FormItem> <mx:FormItem label="Social Security" required="true"> <mx:TextInput id="ssn" width="200" /> </mx:FormItem> </mx:Form> </mx:Application>