createFormField
Add form fields to Brilliant Directories forms for collecting user data, including text inputs, dropdowns, checkboxes, file uploads, and specialized fields like email validation or rich text editors.
Instructions
Create a form field
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| form_name | Yes | Parent form slug | |
| field_name | Yes | DB column name | |
| field_text | Yes | Display label | |
| field_type | Yes | Form field type. Authoritative list from BD admin form-field editor, grouped by category:\n\nSELECT FIELDS (user picks from options):\n Checkbox = Checkboxes (multi-select)\n Select = Dropdown list (single-select)\n Radio = Multiple choice radios (single-select)\n YesNo = Yes or No toggle\n\nTEXT INPUTS:\n Custom = Custom HTML injection\n Email = Email address input (validates format)\n HTML = Section title / HTML heading (display-only)\n Button = Submit form button\n Textbox = Single-line text input\n textarea = Multi-line textarea (note: lowercase)\n Url = Website URL input\n\nFANCY FIELDS:\n Date = Calendar date picker\n DateTimeLocal = Calendar date+time picker\n File = File upload\n FroalaEditor = Froala rich text editor (basic)\n FroalaEditorUserUpload = Froala + user image upload\n FroalaEditorUserUploadPreMadeElem = Froala + upload + pre-made elements\n FroalaEditorAdmin = Froala with admin media manager access\n Tip = Help alert box (display-only)\n Hidden = Hidden field (not rendered, stores value)\n Country = Country dropdown\n State = State dropdown\n Number = Integer-only number input\n Password = Password field (masked)\n Phone = Phone number input\n CountryCodePhone = Phone input with country code\n Pricebox = Price input\n ReCaptcha = Google reCAPTCHA security\n HoneyPot = Hidden honeypot (anti-spam)\n Category = Top-level category list\n Years = Year picker\n\nNote on casing: most values are TitleCase but "textarea" is lowercase — copy exact spelling from the enum. For most simple text collection use Textbox; for paragraphs use textarea; for emails use Email so BD validates the format.\n\nFor Checkbox / Select / Radio types, you must also supply the options list via the field_options parameter (if exposed). | |
| field_order | Yes | ||
| field_required | No | ||
| field_placeholder | No | ||
| field_input_view | No | Show in edit form | |
| field_display_view | No | Show in public view | |
| field_email_view | No | Include in notifications |