/** * Helper function to fill a User object's fields from the registration form * * @param u User object to fill */ private Errors fillUserObject(User u) { Errors errors = new Errors(); // --- Get each EditText's field and store in regUser // First name errors.append( u.setFirst_name( ViewHelpers.getViewText(this, R.id.user_create_account_text_firstName_field))); // Last name errors.append( u.setLast_name( ViewHelpers.getViewText(this, R.id.user_create_account_text_lastName_field))); // Street address errors.append( u.setAddress( ViewHelpers.getViewText(this, R.id.user_create_account_text_streetAddress_field))); // City errors.append( u.setCity(ViewHelpers.getViewText(this, R.id.user_create_account_text_city_field))); // State errors.append( u.setState(ViewHelpers.getViewText(this, R.id.user_create_account_text_state_field))); // Zip Code errors.append( u.setZipcode(ViewHelpers.getViewText(this, R.id.user_create_account_text_zipCode_field))); // FIELD_SSN errors.append( u.setSsn( ViewHelpers.getViewText( this, R.id.user_create_account_text_socialSecurityNumber_field))); // Email errors.append( u.setEmail(ViewHelpers.getViewText(this, R.id.user_create_account_text_email_field))); // Username errors.append( u.setUsername( ViewHelpers.getViewText(this, R.id.user_create_account_text_createUsername_field))); // Password errors.append( u.setPassword( ViewHelpers.getViewText(this, R.id.user_create_account_text_createPassword_field))); return errors; }