1

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.

Thanks.

0

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>
|improve this answer|||||
  • It's just over a normal div, like in your example. – user56339 Jul 14 '17 at 10:20
-1

Use this CSS to set the height:

<style type="text/css">
    .sp-peoplepicker-topLevel{
        height:auto !important;
    }
</style>
|improve this answer|||||

Your Answer

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