Hi,
       After form validation successfull please disable all validators so
that u can't get textinput's as red.
       If u want to validate again then make them to enable.


         private function validateForm(evt:MouseEvent):void {
                var validatorErrorArray:Array =
Validator.validateAll(validatorArr);;
                //Alert.show(validatorErrorArray.length.toString());
                var isValidForm:Boolean = validatorErrorArray.length == 0;
                //Alert.show(isValidForm.toString());
                if (isValidForm) {
                    Alert.show("The form is valid!", "Valid form...");

                    this.shippingAddress1_stringValidator.enabled=false;
                    this.shippingCity_stringValidator.enabled=false;
                    this.shippingName_stringValidator.enabled=false;
                    this.shippingState_numberValidator.enabled=false;

                    shippingName.text = "";
                    shippingAddress1.text = "";
                    shippingAddress2.text = "";
                    shippingCity.text = "";
                    shippingState.selectedIndex = -1;

                } else {
                    var err:ValidationResultEvent;
                    var errorMessageArray:Array = [];
                    for each (err in validatorErrorArray) {
                        var errField:String =
FormItem(err.currentTarget.source.parent).label
                        errorMessageArray.push(errField + ": " +
err.message);
                    }
                    Alert.show(errorMessageArray.join("\n"), "Invalid
form...", Alert.OK);
                }
            }

On Sun, Aug 30, 2009 at 2:37 PM, mahesh bab <mahesh.dudw...@gmail.com>wrote:

> Hi
>
> Here i have  attatched source code.In this form i submitted all the the
> data and i clicked on
>
> submit button.After click on the button form is successfully validated,but
> u will will get textinput
>
> fields boxes are in red color.But my requirement is after click on submit
> button,i want to clear
>
> form data and dont display that red color textinput boxes.How to achieve
> this?
>
>
>
>
>
>
>
>
>
> Regards
>
> D.Mahesh Babu
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to flex_india@googlegroups.com
To unsubscribe from this group, send email to 
flex_india+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to