I have a view where I have the user select a email address from a modal form and update the value in the text box in the main form
<div class="editor-label">
<%: Html.Label("Additional Email Address") %>
</div>
<div class="editor-field modADLookup">
<%: Html.TextBoxFor_Readonly(model => model.AdditionalEmailsSentTo, new {@class = "adEmail", style = "width:500px; height:40px;" })%>
<%: Html.SecurityTrimmedActionButton(true, "Search Active Directory", "Index", "ActiveDirectory", null, "clsSearchButton")%>
</div>
Suppose I select the email abc@abc.com, the text box loads with the value “abc@abc.com”, now when I select xyz@xyz.com the next time, it replaces the “abc@abc.com” with “xyz@xyz.com”.
What I’m looking for is a way to append the email address and have the text box retain the existing email id’s.
For example: after the 2nd selection it should have “abc@abc.com, xyz@xyz.com”.
How do I do the appending in the main form?
Thanks
Sue
After selecting the correct value, catch the value via jquery and append it to the AdditionalEmailsSentTo textbox.
For example when you select an email you do the following: