I want to use a people picker (client-side, created using JavaScript function SPClientPeoplePicker_InitStandaloneControlWrapper) that only allows one person and is only restricted to a single line of text.

There is an option to allow only one user:

schema['AllowMultipleValues'] = false;

However, all it does is merely shows a warning message when more than one user is selected. The field still becomes a two-line field (like in the picture), which breaks the layout.

sharepoint people picker

What would be a good way to never allow this field to span two lines of text? It must be restricted to one line only.



Over which control you have applied this PeoplePicker?

I too have done this using div structure. Which never allows me to break the control into Multiline. It always stay Single line.

Here is what I am using:

<div id="peoplePickerDiv"></div>
  • It's just over a normal div, like in your example. – user56339 Jul 14 '17 at 10:20

Use this CSS to set the height:

<style type="text/css">
        height:auto !important;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy