1 Reply Latest reply on Jan 10, 2008 1:42 PM by Peter Flynn (Adobe)

    FB beta 3 form issue - bug

    Chris Ellem - Sydney Level 1
      FB beta 3 form issue - required fields remain with red border

      When a form is submitted the erroring formitem remains with a red border!

      I am using the following validation function.

      private function valStep7():void {
      if (r_username.text.length == 0){
      r_username.errorString = "Please enter a valid username";
      focusManager.setFocus(r_username);
      }else if(r_givenname.text.length == 0){
      r_givenname.errorString = "Please enter a valid given name!";
      focusManager.setFocus(r_givenname);
      }else if(r_surname.text.length == 0){
      r_surname.errorString = "Please enter a valid surname!";
      focusManager.setFocus(r_surname);r_address
      }else if(r_address.text.length == 0){
      r_address.errorString = "Please enter a vaild address!";
      focusManager.setFocus(r_address);
      }else if(r_suburb.text.length == 0){
      r_suburb.errorString = "Please enter a valid suburb!";
      focusManager.setFocus(r_suburb);
      }else if(r_findus.selectedItem.record_id == 0){
      focusManager.setFocus(r_findus);
      Alert.show('Please select how you found out about us!');
      //+'\n'
      }else{
      usernameService.checkFinalUsername.send();
      }
      }

      is there an easy way to remedy this or has someone had a similar issue?

      the text input controls look like this....etc.


      <mx:FormItem label="First name" styleName="formlabels" required="true">
      <mx:HBox width="100%" height="100%" verticalAlign="bottom">
      <mx:TextInput id="r_givenname" width="180" text="" color="#000000" />
      </mx:HBox>
      </mx:FormItem>

      Any help appreciated...

      Regards

      Chris