CommunityPicker

Shows a text field that suggests communities as you type.

Interface

interface ICommunityField extends IBaseField {
  value?: IKeyTextCommunity;
  selectDefaultCommunity?: boolean;
  validatePermissions?: boolean;
  onlyHubSites?: boolean;
  allowSelectDestinationList?: boolean;
  selectedList?: string;
  allowSelectDestinationFolder?: boolean;
  selectedFolder?: string;
}

Example

CommunityPicker
{
  "name": "community",
  "type": "CommunityPicker",
  "label": {
    "en-US": "Community to share",
    "es-ES": "Comunidad donde compartir"
  },
  "description": {
    "en-US": "Specify in which community the article will be published",
    "es-ES": "Especifique en qué comunidad se publicará el artículo"
  },
  "validation": {
    "required": true
  },
  "allowSelectDestinationList": false,
  "validatePermissions": true
}

Properties

type

Must be “CommunityPicker”.

  • Type: "CommunityPicker"

  • Required: Yes

value

Default value of the community.

selectDefaultCommunity

If true, select by default the community where you are.

  • Type: boolean

  • Required: No

  • Default value: true

validatePermissions

If true, validates if the current user has permissions in the community to be able to create content.

  • Type: boolean

  • Required: No

onlyHubSites

If true, it only returns hub sites.

  • Type: boolean

  • Required: No

allowSelectDestinationList

A dropdown will be displayed to choose the list where the content will be saved.

  • Type: boolean

  • Required: No

allowSelectDestinationFolder

It will show a folder browser so you can choose the folder where the content will be saved.

  • Type: boolean

  • Required: No

selectedFolder

It is the default relative path of the selected folder.

  • Type: string

  • Required: No

  • Example: "/folder/subfolder"