Thursday, November 5, 2015

how to people picker field selected value bind to text box in newform.aspx


In this post when user select the user in people picker column ,same value append in another text box
we have added jquery min file.

See the below code I get  selected username below the tag.

$('.ms-entity-resolved[id^="txt_Originator"]').attr('title') .


<script type="text/javascript">

function PreSaveAction(){
$('input[title^="Originator"]').val($('.ms-entity-resolved[id^="txt_Originator"]').attr('title'));
$('input[title^="txt_OriginalAuthor"').val($('.ms-entity-resolved[id^="txt_OriginalAuthor"]').attr('title'));
return true;
}

</script>

No comments:

Post a Comment