Auto populate text field with people picker value

I have a form with a SharePoint people picker lookup field (EmployeeName). What i would like to accomplish is auto populate a non-people picker field (just a text field) with the value that's in the EmployeeName (people picker) field, which is just their name (Doe, John).

I'm new to JS so if someone could assist i would appreciate...thanks!

Hello @ParAvion,

You can use the below script to set the field value with the User Name selected in the people picker field. Just replace Title and PeoplePicker with internal field names.

fd.spRendered(function() {

     fd.field('PeoplePicker ').$on('change', function () {
                fd.field('Title').value = fd.field('PeoplePicker ').value.DisplayText;

Hi @mnikitina thanks again!

1 Like