public ActionResult NewAccount(InvitationModel model) { //Clear ModelState errors so the ValidationSummary doesn't display "errors" when the form is initially displaying. It should only show when the form is submitted. ModelState.Clear(); //The first time we come into the NewAccount action, we need to specify a Create method if (model.ATSMethod == ATS.Methods.NotInitialized) { model.ATSMethod = ATS.Methods.CreateContact; } //Replace punctuation in name fields (such as a middle initial) since it is not allowed as input ReplacePunctuation(ref model); if (model.CloneAccount) { ViewBag.Title = "Create New Username"; string memberTypeDesc = InvitationRepository.GetMemberTypeDesc(model.MemberType); ViewBag.Subtitle = "We found your " + memberTypeDesc + " account but we must create a new Employee account with a different web username. " + "Please choose a username that is not the same as:"; ViewBag.HighlightText = model.Username; model.DoNotDuplicateUsername = model.Username; //Clear out the username since the user can't duplicate it with the new EMP account model.Username = String.Empty; } else { ViewBag.Title = "Create a New Account"; ViewBag.Subtitle = "Associated with"; ViewBag.HighlightText = model.InstituteName; } return(View(model)); }