API Reference - Form Fields
Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108076
← Back to API Reference | Getting Started
Form Fields
Form Fields define the individual input elements that make up a form. Each field belongs to a form (identified by form_name) and controls how data is displayed, entered, searched, and emailed. Fields can be text inputs, textareas, dropdowns, checkboxes, hidden fields, and more.
Model name in URL:
form_fields — DB table: form_fieldsThe Form Fields Object
| Field | Type | Description |
|---|---|---|
field_id | integer | Unique field ID (primary key, read-only) |
form_name | string | Machine name of the parent form this field belongs to |
field_text | text | Label text displayed to the user, or a template token (EG %%%field_label%%%) |
field_name | string | Database column name the field maps to in the target table |
field_type | string | Input type (EG text, textarea, select, checkbox, Hidden, Button, HTML) |
field_order | integer | Display order of the field within the form (lower numbers appear first) |
field_sdesc | text | Short description or help text shown near the field |
field_ldesc | text | Long description or extended help text for the field |
field_placeholder | string | Placeholder text shown inside the input when it is empty |
field_required | integer | Whether the field is required: 1 = required, 0 = optional |
field_options | text | Pipe-delimited list of options for select, checkbox, or radio fields (EG Option 1|Option 2|Option 3) |
input_class | string | CSS class(es) applied to the input element |
display_class | string | CSS class(es) applied to the display wrapper element |
default_value | text | Default value pre-filled in the field when the form loads |
field_display_view | string | Whether to show the field in the public display view: 1 = yes, 0 = no |
field_input_view | string | Whether to show the field in the input/edit view: 1 = yes, 0 = no |
field_grid_view | string | Whether to show the field in grid/listing views: 1 = yes, 0 = no |
field_email_view | string | Whether to include the field in email notifications: 1 = yes, 0 = no |
form_section | string | Section or group name used to visually group related fields |
field_search_view | string | Whether to show the field in search forms: 1 = yes, 0 = no |
display_div_id | string | HTML element ID wrapping the display output of this field |
input_div_id | string | HTML element ID wrapping the input element of this field |
revision_timestamp | timestamp | Date and time the field was last modified |
field_icon | string | Icon class (EG a Font Awesome class) displayed alongside the field label |
json_meta | text | JSON-encoded metadata for extended field configuration options |
field_display_view_button_target | string | Display view button link target setting |
input_view_label | string | Custom label for input view |
display_view_label | string | Custom label for display view |
field_display_view_button_text | string | Display view button text |
field_display_view_button | string | Display view button toggle |
search_view_label | string | Custom label for search view |
email_view_label | string | Custom label for email view |
grid_view_label | string | Custom label for grid view |
field_input_view_admin_only | string | Admin-only input view toggle |
List Form Fields Records
GET /api/v2/form_fields/get
Returns a paginated list of form field records.
Example Request
Copy
curl -X GET "https://www.yourdomain.com/api/v2/form_fields/get?limit=25" \ -H "X-Api-Key: your-api-key-here"
Example Response
Copy
{
"status": "success",
"message": [
{
"tablesExists": true,
"field_id": "45351",
"form_name": "member_listing_details",
"field_text": "%%%member_listing_honors%%%",
"field_name": "awards",
"field_type": "textarea",
"field_order": "10",
"field_sdesc": "",
"field_ldesc": "",
"field_placeholder": "",
"field_required": "0",
"field_options": "",
"input_class": "",
"display_class": "",
"default_value": "",
"field_display_view": "1",
"field_input_view": "1",
"field_grid_view": "0",
"field_email_view": "0",
"form_section": "",
"field_search_view": "0",
"display_div_id": "",
"input_div_id": "",
"revision_timestamp": "2025-01-06 09:06:48",
"field_icon": "",
"json_meta": ""
}
],
"total": "149",
"current_page": 1,
"total_pages": 6,
"next_page": "MipfKjM="
}Retrieve a Form Field
GET /api/v2/form_fields/get/{field_id}
Example Request
Copy
curl -X GET "https://www.yourdomain.com/api/v2/form_fields/get/45351" \ -H "X-Api-Key: your-api-key-here"
Example Response
Copy
{
"status": "success",
"message": [
{
"tablesExists": true,
"field_id": "45351",
"form_name": "member_listing_details",
"field_text": "%%%member_listing_honors%%%",
"field_name": "awards",
"field_type": "textarea",
"field_order": "10",
"field_sdesc": "",
"field_ldesc": "",
"field_placeholder": "",
"field_required": "0",
"field_options": "",
"input_class": "",
"display_class": "",
"default_value": "",
"field_display_view": "1",
"field_input_view": "1",
"field_grid_view": "0",
"field_email_view": "0",
"form_section": "",
"field_search_view": "0",
"display_div_id": "",
"input_div_id": "",
"revision_timestamp": "2025-01-06 09:06:48",
"field_icon": "",
"json_meta": ""
}
],
"total": "1",
"current_page": 1,
"total_pages": 1
}Create a Form Field
POST /api/v2/form_fields/create
Example Request
Copy
curl -X POST "https://www.yourdomain.com/api/v2/form_fields/create" \ -H "X-Api-Key: your-api-key-here" \ -d "form_name=contact_form" \ -d "field_name=phone_number" \ -d "field_text=Phone+Number" \ -d "field_type=text" \ -d "field_order=3" \ -d "field_required=0" \ -d "field_placeholder=Enter+your+phone+number" \ -d "field_input_view=1" \ -d "field_display_view=1" \ -d "field_email_view=1"
Example Response
Copy
{
"status": "success",
"message": {
"field_id": "46715",
"form_name": "contact_form",
"field_text": "Phone Number",
"field_name": "phone_number",
"field_type": "text",
"field_order": "3",
"field_sdesc": null,
"field_ldesc": null,
"field_placeholder": "Enter your phone number",
"field_required": "0",
"field_options": null,
"input_class": null,
"display_class": null,
"default_value": null,
"field_display_view": "1",
"field_input_view": "1",
"field_grid_view": null,
"field_email_view": "1",
"form_section": null,
"field_search_view": null,
"display_div_id": null,
"input_div_id": null,
"revision_timestamp": null,
"field_icon": null,
"json_meta": null
}
}Update a Form Field
PUT /api/v2/form_fields/update
Example Request
Copy
curl -X PUT "https://www.yourdomain.com/api/v2/form_fields/update" \ -H "X-Api-Key: your-api-key-here" \ -d "field_id=46715" \ -d "field_text=Phone+Number+%28Optional%29" \ -d "field_placeholder=555-555-5555"
Example Response
Copy
{
"status": "success",
"message": {
"field_id": "46715",
"form_name": "contact_form",
"field_text": "Phone Number (Optional)",
"field_name": "phone_number",
"field_type": "text",
"field_order": "3",
"field_sdesc": "",
"field_ldesc": "",
"field_placeholder": "555-555-5555",
"field_required": "0",
"field_options": "",
"input_class": "",
"display_class": "",
"default_value": "",
"field_display_view": "1",
"field_input_view": "1",
"field_grid_view": "1",
"field_email_view": "1",
"form_section": "",
"field_search_view": "",
"display_div_id": "",
"input_div_id": "",
"revision_timestamp": "2026-04-03 23:42:59",
"field_icon": "",
"json_meta": ""
}
}Delete a Form Field
DELETE /api/v2/form_fields/delete
Example Request
Copy
curl -X DELETE "https://www.yourdomain.com/api/v2/form_fields/delete" \ -H "X-Api-Key: your-api-key-here" \ -d "field_id=46715"
Example Response
Copy
{
"status": "success",
"message": "form_fields record was deleted"
}