Form control: Object Picker

The objectPicker control allows users to select one or multiple records from a given preside object. Configuration options also allow you to add new records and edit existing records from within the form control.

Arguments

object (required) Name of the object whose records the user can select
ajax (optional) True (default) or false. Whether or not to fetch records for the picker using Ajax.
objectFilters (optional) String list of saved preside object filters. See Data objects
prefetchUrl (optional) When ajax is set to "true", you can additionally supply a specific URL for fetching records to pre-populate the drop down
remoteUrl (optional) When ajax is set to "true", you can additionally supply a specific URL for fetching records to match typed searches
useCache (optional) True (default) or false. Whether to use caching when selecting data for this form field and its respective ajax lookup and prefetch.
orderBy (optional) Specify which column(s) to sort the select list on. Default is "label", which sorts alphabetically on the text displayed in the picker.
placeholder (optional) Message to appear prompting the user to search for records
multiple (optional) True of false (default). Whether or not to allow multiple record selection
sortable (optional) True or false (default). Whether or not to allow multiple selected records to be sortable within the control.
searchable (optional) True (default) or false. Whether or not the search feature of the control is enabled.
resultTemplate (optional) A Mustache template for rendering items in the drop down list. The default is "{{text}}". This can be used in conjunction with a custom remote URL for providing a highly customized object picker.
selectedTemplate (optional) A Mustache template for rendering selected items in the control. The default is "{{text}}". This can be used in conjunction with a custom remote URL for providing a highly customized object picker.
quickAdd (optional) True of false (default). Whether or not the quick add record feature is enabled. If enabled, you should create a /forms/preside-objects/(objectname)/admin.quickadd.xml form that will be used in the quick add dialog.
quickAddUrl (optional) If quickAdd is enabled, you can additionally set a custom URL for providing the quick add form.
quickEdit (optional) True of false (default). Whether or not the quick edit record feature is enabled. If enabled, you should create a /forms/preside-objects/(objectname)/admin.quickadd.xml form that will be used in the quick edit dialog.
quickEditUrl (optional) If quickEdit is enabled, you can additionally set a custom URL for providing the quick edit form.
bypassTenants (optional) A comma separated list of tenants to **ignore** when populating the dropdown. See Configuring data tenancy.

Example

<field name="categories" control="objectPicker" object="blog_category" multiple="true" sortable="true" quickAdd="true" quickEdit="true" />

Example with caching disabled

<field name="categories" useCache="false" control="objectPicker" object="blog_category" multiple="true" sortable="true" quickAdd="true" quickEdit="true" />

Screenshot of object picker