API Reference - Forms
Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108075
← Back to API Reference | Getting Started
Forms
Forms define the structure and configuration of data-entry forms used throughout your directory website. Each form record specifies the target database table, email notification settings, layout, and other rendering options. Form fields are managed separately via the Form Fields endpoint.
Model name in URL:
form — DB table: formsThe Forms Object
| Field | Type | Description |
|---|---|---|
form_id | integer | Unique form ID (primary key, read-only) |
form_name | string | Internal machine name for the form (used to reference it in widgets and code) |
form_desc | text | Optional description of the form's purpose |
form_url | text | URL to redirect to after form submission |
form_target | string | Redirect target (EG _blank to open in a new tab) |
form_action | string | HTTP method used to submit the form (EG post) |
form_database | string | Database identifier the form writes to (blank for the default site database) |
form_table | string | Database table the form writes to (EG users_data, data_posts) |
table_index | string | Primary key column of the target table used to identify the record being updated |
form_email_recipient | string | Email address to receive form submission notifications |
form_title | string | Human-readable title displayed in the admin panel |
form_email_on | integer | Whether to send email notifications on submission: 1 = enabled, 0 = disabled |
email_template | string | Email template name sent to the member/submitter |
email_admin | integer | Whether to also send notification email to the admin: 1 = yes, 0 = no |
email_from | string | From email address used in notification emails |
email_template_admin | string | Email template name sent to the admin |
form_class | string | CSS class(es) applied to the form element (EG form-control) |
form_style | text | Inline CSS styles applied to the form element |
form_element_id | string | HTML id attribute applied to the form element |
short_code | string | Short code used to embed the form in content areas |
form_layout | string | Layout framework for the form (EG bootstrap) |
trigger_data_flow | string | Whether to trigger a data flow automation on submission (EG No, Yes) |
data_flow_name | string | Name of the data flow automation to trigger on submission |
revision_timestamp | timestamp | Date and time the form was last modified |
form_action_type | string | How the form processes its action after submission (EG default) |
form_action_div | string | ID of the HTML element to update or target after submission |
label_to_placeholder | string | Virtual field controlling label-to-placeholder conversion |
return_data_type | string | Virtual field specifying form return data type |
form_fields_name | string | Virtual field for form field name reference |
old_form_name | string | Virtual field storing previous form name |
disable | string | Virtual field controlling form disabled state |
List Forms Records
GET /api/v2/form/get
Returns a paginated list of form records.
Example Request
Copy
curl -X GET "https://www.yourdomain.com/api/v2/form/get?limit=25" \ -H "X-Api-Key: your-api-key-here"
Example Response
Copy
{
"status": "success",
"message": [
{
"tablesExists": true,
"form_id": "313",
"form_name": "member_listing_details",
"form_desc": "",
"form_url": "",
"form_target": "",
"form_action": "post",
"form_database": "",
"form_table": "users_data",
"table_index": "user_id",
"form_email_recipient": "",
"form_title": "Listing - Additional Details - Member",
"form_email_on": "0",
"email_template": "",
"email_admin": "0",
"email_from": "",
"email_template_admin": "",
"form_class": "form-control",
"form_style": "",
"form_element_id": "",
"short_code": "",
"form_layout": "bootstrap",
"trigger_data_flow": "No",
"data_flow_name": "",
"revision_timestamp": "2025-01-06 14:06:48",
"form_action_type": "default",
"form_action_div": ""
}
],
"total": "9",
"current_page": 1,
"total_pages": 1
}Retrieve a Form
GET /api/v2/form/get/{form_id}
Example Request
Copy
curl -X GET "https://www.yourdomain.com/api/v2/form/get/313" \ -H "X-Api-Key: your-api-key-here"
Example Response
Copy
{
"status": "success",
"message": [
{
"tablesExists": true,
"form_id": "313",
"form_name": "member_listing_details",
"form_desc": "",
"form_url": "",
"form_target": "",
"form_action": "post",
"form_database": "",
"form_table": "users_data",
"table_index": "user_id",
"form_email_recipient": "",
"form_title": "Listing - Additional Details - Member",
"form_email_on": "0",
"email_template": "",
"email_admin": "0",
"email_from": "",
"email_template_admin": "",
"form_class": "form-control",
"form_style": "",
"form_element_id": "",
"short_code": "",
"form_layout": "bootstrap",
"trigger_data_flow": "No",
"data_flow_name": "",
"revision_timestamp": "2025-01-06 14:06:48",
"form_action_type": "default",
"form_action_div": ""
}
],
"total": "1",
"current_page": 1,
"total_pages": 1
}Create a Form
POST /api/v2/form/create
Example Request
Copy
curl -X POST "https://www.yourdomain.com/api/v2/form/create" \ -H "X-Api-Key: your-api-key-here" \ -d "form_name=contact_form" \ -d "form_title=Contact+Us+Form" \ -d "form_action=post" \ -d "form_layout=bootstrap" \ -d "form_class=form-control" \ -d "form_table=form_inquiries" \ -d "form_email_on=1" \ -d "form_email_recipient=admin%40yourdomain.com"
Example Response
Copy
{
"status": "success",
"message": {
"form_id": "351",
"form_name": "contact_form",
"form_desc": null,
"form_url": null,
"form_target": null,
"form_action": "post",
"form_database": null,
"form_table": "form_inquiries",
"table_index": null,
"form_email_recipient": "admin@yourdomain.com",
"form_title": "Contact Us Form",
"form_email_on": "1",
"email_template": null,
"email_admin": null,
"email_from": null,
"email_template_admin": null,
"form_class": "form-control",
"form_style": null,
"form_element_id": null,
"short_code": null,
"form_layout": "bootstrap",
"trigger_data_flow": null,
"data_flow_name": null,
"revision_timestamp": null,
"form_action_type": null,
"form_action_div": null
}
}Update a Form
PUT /api/v2/form/update
Example Request
Copy
curl -X PUT "https://www.yourdomain.com/api/v2/form/update" \ -H "X-Api-Key: your-api-key-here" \ -d "form_id=351" \ -d "form_title=Contact+Us+Updated" \ -d "form_email_on=0"
Example Response
Copy
{
"status": "success",
"message": {
"form_id": "351",
"form_name": "contact_form",
"form_desc": "",
"form_url": "",
"form_target": "",
"form_action": "post",
"form_database": "",
"form_table": "form_inquiries",
"table_index": "",
"form_email_recipient": "admin@yourdomain.com",
"form_title": "Contact Us Updated",
"form_email_on": "0",
"email_template": "",
"email_admin": "0",
"email_from": "",
"email_template_admin": "",
"form_class": "form-control",
"form_style": "",
"form_element_id": "",
"short_code": "",
"form_layout": "bootstrap",
"trigger_data_flow": "",
"data_flow_name": "",
"revision_timestamp": "2026-04-03 23:47:39",
"form_action_type": "",
"form_action_div": ""
}
}Delete a Form
DELETE /api/v2/form/delete
Example Request
Copy
curl -X DELETE "https://www.yourdomain.com/api/v2/form/delete" \ -H "X-Api-Key: your-api-key-here" \ -d "form_id=351"
Example Response
Copy
{
"status": "success",
"message": "form record was deleted"
}