Contents
On this page
List Public Custom Fields - Plugixa Team
GET /plugixateam/v1/frontend/custom-fields
List the custom fields that are shown on the site, in their set order, for a headless front end or your own submission form.
Needs Plugixa Team Pro. No sign-in: anyone can call it. Only what a form needs is returned; placeholders, positions, ids and counts are left out.
Note. This lists fields marked shown on the site, not fields offered on the form. A field that is on the form but hidden from profiles is missing here, although Submit Member still reads it, and enforces it when it is required. Build a form from the entries with
show_in_form: true, and add any form-only fields yourself.
Request
GET https://your-site.example/wp-json/plugixateam/v1/frontend/custom-fields
This endpoint takes no parameters and is not paged. On a WPML or Polylang site it answers in the current language, plus fields that have no language.
Responses
200 OK. data is the list of fields.
{
"success": true,
"message": "",
"data": [
{
"field_key": "pronouns",
"field_label": "Pronouns",
"field_type": "select",
"field_options": [
"she/her",
"he/him",
"they/them"
],
"is_required": false,
"show_in_frontend": true,
"show_in_form": true
},
{
"field_key": "desk_number",
"field_label": "Desk number",
"field_type": "text",
"field_options": null,
"is_required": false,
"show_in_frontend": true,
"show_in_form": false
}
]
}
| Field | Type | Meaning |
|---|---|---|
data[].field_key |
string |
The key to send the value under, as meta[<key>] |
data[].field_label |
string |
The label to show |
data[].field_type |
string |
text, textarea, url, number, date, select, checkbox, color, file, email or phone |
data[].field_options |
array|null |
The choices of a select or checkbox field |
data[].is_required |
boolean |
A submission must fill it in |
data[].show_in_frontend |
boolean |
Always true here |
data[].show_in_form |
boolean |
Offered on the submission form |
Errors
| Status | Code | When |
|---|---|---|
404 |
rest_no_route |
The site runs the free build. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixateam/v1/frontend/custom-fields"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixateam/v1/frontend/custom-fields');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixateam/v1/frontend/custom-fields');
const { data } = await response.json();
Quick Links
Share