In a model/view architecture, you would reset the model or generate a new instance of the model
Alex Harui Flex SDK Developer Adobe Systems Inc.<http://www.adobe.com/> Blog: http://blogs.adobe.com/aharui From: [email protected] [mailto:[email protected]] On Behalf Of smccran Sent: Thursday, April 09, 2009 6:21 AM To: [email protected] Subject: [flexcoders] Form field clearing Hi all, I have a standard flex form, and I want to do a simple 'reset' function. At the moment I would simply set each field value as blank like this: private function clear():void { nameField.text = ""; tel.text = ""; email.text = ""; } <mx:Form x="10" y="105" id="jobRequest"> <mx:FormItem label="Name" required="true"> <mx:TextInput id="nameField"/> </mx:FormItem> <mx:FormItem label="Tel" required="true"> <mx:TextInput id="tel"/> </mx:FormItem> <mx:FormItem label="Email" required="true"> <mx:TextInput id="email"/> </mx:FormItem> Is there a better way of doing this? Or a way I can just say jobRequest.reset? where 'jobRequest' is the form name. Thanks Shaun

