Skip to main content
added 1 character in body
Source Link
Aakash Maurya
  • 8.5k
  • 5
  • 43
  • 76

I want to use a people picker (cientclient-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.

I want to use a people picker (cient-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.

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.

edited tags
Link
user56339
user56339
Source Link
user56339
user56339

Restrict client-side people picker in SharePoint to single line of text

I want to use a people picker (cient-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.