Reusable Lookup - smbc-digital/form-builder GitHub Wiki

Lookup

Lookup allows the reuse of Options for certain element types list below. If a lookup and options are declared the lookup properties will be appended after the options declared within properties.

Note

Please do not use 'dynamic as your lookup string. For info see dynamic lookup

Valid on Element types

Lookup json example

[
  {
    "Text": "Apples",
    "Value": "Apples",
    "Hint": "Golden Delicious are amazing"
  },
  {
    "Text": "Pear",
    "Value": "Pear"
  }
]

Example Json

Example with lookup data source

{
                    "Type": "Checkbox",
                    "Lookup": "fruits",
                    "Properties": {
                        "Hint": "You can select <strong>more than one option</strong>",
                        "Label": "The options within this checkbox are located within an external template",
                        "QuestionId": "CheckBoxList"
                    }
                }

Example with lookup data source and additonal form options

{
             "Type": "Checkbox",
             "Lookup": "fruits",
             "Properties": {
                 "Hint": "You can select <strong>more than one option</strong>",
                 "Label": "The options within this checkbox are located within an external template",
                 "QuestionId": "CheckBoxList",
                 "Options": [
                  {
                      "Value": "apple",
                     "Text": "Apple"
                  }]
              }
}
⚠️ **GitHub.com Fallback** ⚠️