> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowforma.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PersonOrGroupPicker

> Use the FlowForma PersonOrGroupPicker widget to let users select people or groups, as in a person or group question or the Step assign to rule.

## Function

`FlowForma.Widgets.PersonOrGroupPicker(container, value, options)`

## Description

This function creates a FlowForma picker, when using a person or group picker.

## Uses

An example of when this is used is when a person or group question has been added to the flow, and a user is entering in a name.
Also when configuring the [Step assign to](/product/creating-flows/business-rules/business-rule-types/workflow-control-rules/step-assign-to) rule, the person configuring the rule may need to enter a name of a person or group.

<img src="https://mintcdn.com/flowforma/g56Im1vOp6-ECYen/images/developers/widgets/personorgrouppicker/personorgrouppicker-1.png?fit=max&auto=format&n=g56Im1vOp6-ECYen&q=85&s=75958d3e6c26df7b5f29c7a10b23e37c" alt="PersonOrGroupPicker widget" width="609" height="593" data-path="images/developers/widgets/personorgrouppicker/personorgrouppicker-1.png" />

## Variables

**container**:

*Format* - jQuery input element. (Example: \$("#picker")).

*Description* - This element will be used to build the FlowForma people picker on to.

**value**:

*Format* – Stringified JSON object.

*Description* – If the variable is defined it selects the user.

**options**:

*Format* – Object. (Example: `var options = { AllowCustomText: true, SelectSteps: true }`).

*Default options* –

```js theme={null}
AllowCustomText = false;
SPGroupID: '',
SelectionMode: 'PeopleGroups',
InputEnabled: true,
Height: '30px',
Width: "300px",
Scrolling: "no",
Restrict2Self: false,
AllowMultiple: false
```

*Description* – Allows to set custom functionality to the widget.

## Properties and functions

FlowForma picker object has few functions and properties and can be retrieved as shown below:

```js theme={null}
var picker = $("#picker").data("PersonOrGroupPicker");
```

**Functions:**

*Picker.Value()* – returns currently selected person object as JSON string.

*Picker.Enable(bool)* – enables/disables the picker by passing true or false.

*Picker.Clear()* – clears the currently selected value.picker.

Picker.OnEntityResolved() - this is useful to see when it was resolved and the whole object of the person/group was returned
