Define a Flex data model that contains two values
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> private function processValues():void { var myZipCode:String = myFormModel.zipCodeModel; var myPhoneNumber:String = myFormModel.phoneNumberModel; } </mx:Script> <mx:Model id="myFormModel"> <info> <zipCodeModel>{zipCode.text}</zipCodeModel> <phoneNumberModel>{phoneNumber.text}</phoneNumberModel> </info> </mx:Model> <mx:Form borderStyle="solid"> <mx:FormItem label="Zip Code"> <mx:TextInput id="zipCode" /> </mx:FormItem> <mx:FormItem label="Phone Number"> <mx:TextInput id="phoneNumber" /> </mx:FormItem> <mx:FormItem> <mx:Button id="b1" label="Submit" click="processValues();" /> </mx:FormItem> </mx:Form> </mx:Application>