Default values from API

Ave81

New Member
Hello,

Can you tell us how to receive default values and drop-down options via the API? We're using the "getFields" function but it returns filled data (our code is the same as the PHP example here). However, this is what we receive:

Code:
[
  {
    "tag": "DATEFIELD",
    "label": "DATE FIELD label",
    "required": "no",
    "help_text": "",
    "type": {
      "name": "Date",
      "identifier": "date",
      "description": "Date"
    }
  },
  {
    "tag": "DATETIMEFIELD",
    "label": "Date time ???",
    "required": "no",
    "help_text": "",
    "type": {
      "name": "Datetime",
      "identifier": "datetime",
      "description": "Datetime"
    }
  },
  {
    "tag": "DROPDOWN",
    "label": "Drop down",
    "required": "no",
    "help_text": "",
    "type": {
      "name": "Dropdown",
      "identifier": "dropdown",
      "description": "Dropdown"
    }
  },
  {
    "tag": "EMAIL",
    "label": "Email",
    "required": "yes",
    "help_text": "",
    "type": {
      "name": "Text",
      "identifier": "text",
      "description": "Text"
    }
  },
  {
    "tag": "HIDDENTEXT",
    "label": "Hiddent text field",
    "required": "no",
    "help_text": "",
    "type": {
      "name": "Text",
      "identifier": "text",
      "description": "Text"
    }
  },
  {
    "tag": "MULTI",
    "label": "Multi select field",
    "required": "no",
    "help_text": "",
    "type": {
      "name": "Multiselect",
      "identifier": "multiselect",
      "description": "Multiselect"
    }
  },
  {
    "tag": "TEXTAREA",
    "label": "Text area field",
    "required": "no",
    "help_text": "",
    "type": {
      "name": "Textarea",
      "identifier": "textarea",
      "description": "Textarea"
    }
  },
  {
    "tag": "TEXTFIELD",
    "label": "Text field",
    "required": "no",
    "help_text": "",
    "type": {
      "name": "Text",
      "identifier": "text",
      "description": "Text"
    }
  }
]
 
Last edited by a moderator:
@Ave81 - Unfortunately that's all you can get with the API as far as fields go. To retrieve more info one would have to add his own endpoint and add custom code there to extract all.
 
Back
Top