Input Fields

From 3B Knowledge
Jump to navigation Jump to search

Each input field is defined as an object inside a form configuration (e.g., recordFormFields, recordFormFieldsAcceptance, etc.). This guide explains all possible properties and their use cases.

Core Properties

Property Description
field The API name of the Salesforce field. Only first-level fields are supported (no dot notation).
type Defines the field component type (see "Supported Field Types" below).
labelOverride If present, replaces the default label (from Salesforce metadata) with a custom one.
required Accepts a boolean or a selector. If true, we will render the field in its required state.
hidden New from v4.0. Accepts a boolean. If true, we will render the field, but we will hide it. Useful when you want to set a "default" value, but you don't want the user to see the field.
disabled Accepts a boolean or a selector. If true, we will render the field as disabled.
prePopulate New from v4.0. Accepts a boolean. If true (default), the field will be pre-populated from the record's value. If false, the "default" value will be applied but we won't use the record's value.
default Accepts a string. Can be a static string or a dynamic string (available properties are: :contextStart & :contextEnd (start/end dates of the record), :contextId (the contextual recordId), :contactUserId & :userId (the contextual user's contact id)
props Accepts an object. Useful when you want to apply other field properties, e.g. "props": { "hideDate": false }
siteTimezoneFieldPath New from v4.0. You can define the timezone for the field types field-date-time-input, field-date-input and field-time-range-selector

Supported Field Types

Type Description
field-file-upload Renders a file upload field. Props object is useful: "props": { "placeholder": "Upload File", "maxFileSize": 1000000, "accept": "image/*,.pdf" }
field-number-input Renders a number selector field
field-time-range-selector Renders a Start-End pair. The "field" property must provide the names of two date-time fields, e.g. "field": "b3s__Scheduled_Start_Time__c:b3s__Scheduled_End_Time__c". You can also hide the date component by using the props object "props": { "hideDate": true }
field-date-input Renders a Date Input field
field-checkbox Renders a checkbox input
field-text-area Renders a text-area field
field-text Renders a text input
field-date-time-input Renders a date & time selection component
field-time-input Renders a time selection component
field-select Renders a drop down (or a pop-up select using the "optionsInPopout": true property). Add the property "isMultiselect": true to render a multi-select field. Add the property "loader" to render as record select.

For type: field-select, you get some bonus behaviors:

Property Description
options A manual list of dropdown values. Skips automatic describing. Example:
{
    "field": "b3s__Status__c",
    "props": {
        "hideNoneOption": true
    },
    "type": "field-select",
    "hidden": true,
    "required": true,
    "disabled": true,
    "prePopulate": false,
    "default": "Accepted",
    "options": [
        {
            "label": "Accepted",
            "value": "Accepted"
        }
    ]
}
loader Name of the DataLoader to use for fetching record options dynamically. E.g.
{
    "field": "b3s__Job__c",
    "labelOverride": "Job",
    "type": "field-select",
    "required": true,
    "disabled": false,
    "default": ":contextId",
    "optionsInPopout": true,
    "loader": "jobs",
    "optionLabelField": "Name"
}
optionLabelField When using loader, defines which field to use for the dropdown label.
optionExtendedDetails Array of {label, targetField} to show more info per dropdown option.
showOptionIf A condition selector that determines which options to show, not which fields.
optionsInPopout If true, renders the dropdown in a modal popout instead of inline.
{
    "field": "b3s__Placement__c",
    "labelOverride": "Placement",
    "type": "field-select",
    "required": false,
    "disabled": {
        "condition": {
            "allOrSome": "all",
            "selectors": [
                {
                    "field": "b3s__Contact__c",
                    "operator": "isnull",
                    "value": true
                }
            ]
        }
    },
    "optionsInPopout": true,
    "loader": "placements",
    "optionLabelField": "Name",
    "optionExtendedDetails": [
        {
            "label": "Person Placed",
            "targetField": "b3o__Candidate__r.Name"
        }
    ],
    "showOptionIf": {
        "condition": {
            "allOrSome": "all",
            "selectors": [
                {
                    "field": "b3s__Contact__c",
                    "operator": "equals",
                    "targetField": "b3o__Candidate__c"
                },
                {
                    "field": "b3s__Job__c",
                    "operator": "equals",
                    "targetField": "b3o__Job__c"
                }
            ]
        }
    }
}
isMultiselect If set to true, the field will be rendered as multi-select

Layout Blocks

Property Description
isSeparator If true, shows a section header. Use label and columns.
isEmptyBlock If true, adds vertical spacing with no visible field.

Supported props (per field type)

  • field-select
    • hideNoneOption: true → hides the default empty/none option.
  • field-file-upload
    • placeholder: e.g. "Upload File"
    • maxFileSize: in bytes (e.g. 1000000)
    • accept: MIME types and extensions (e.g. "image/*,.pdf")
  • field-time-range-selector
    • hideDate: true → hides the date part of the range selector.

Adding Related Objects

Check out the article on Form Related Objects.

Scheduler Visibility Controls

For recordFormFields defined to the "shift" schedulable in the Scheduler app, an additional "views" object property has to be provided:

"views": {
    "shiftView": true,
    "bulkEditView": true,
    "blukCreateView": true
}

- shiftView - if set to true, the field will be visible when creating/editing a shift

- bulkEditView - if set to true, the field will be visible when editing multiple shifts

- bulkCreateView - if set to true, the field will be visible in the multi-shift creation pop-up