Configure forms, registry keys, and schemas
This guide is split by task. Developers edit wckd-forms/forms/registry.php and files under wckd-forms/forms/schemas/. Managers (users who can open Settings → Forms per dashboard_can_manage in your build) adjust routing, mail, and embed snippets without touching PHP on every change. You will know how the three layers fit together and how to add a new template safely.
Every live form resolves a registry key to a PHP schema; the second argument to wckd_form() sets the placement label stored as form_name for inbox and performance filters.
You map the embed string to files on disk before you change settings.
- Open
wckd-forms/forms/registry.phpin an editor. - Note the array key (for example
default): that string is the first argument towckd_form(). - Open the linked file under
wckd-forms/forms/schemas/and scan field names, types, and database column mapping.
Screenshot. Show one registry entry and its schema header in your editor.
You override thank-you URLs, mail, routing, auto-reply, and optional per-form SMTP without redeploying PHP for every tweak. Department routing is set in the form builder on the Department field’s Choices (staff@email|Label lines). Multi-email forward (signed per-page staff address via PHP) is under Advanced settings. Neither is on the Operations tab — see Notifications for how they differ.
- Sign in as a Manager (or other role your install allows into settings).
- Open Settings → Forms and click Configure on the template key you located in Step 1.
- Under Advanced settings, use each checkbox to reveal custom thank-you / not-sent URLs, contact fields, SMTP, auto-reply, or Use multi-email forward when needed.
- Save the form; repeat for each registry key you expose to editors.
Screenshot. Show Settings → Forms with one template selected.
Managers can change which fields appear on the public form and their order without editing PHP by hand, as long as your install exposes the flyout.
- Open Settings → Forms and click Configure on a template.
- Use Add field, move up/down, and remove to shape the schema. The Field list combines built-in columns (name, email, phone, department dropdown, address fields, message, etc.) with anything you added under Settings → Form Fields (Your fields).
- For dropdowns and radios, fill Choices (one per line; optional
value|Label). - For a Department dropdown that routes staff mail, add the Department field archetype and fill Choices with one line per inbox:
staff@example.com|Sales(email first, then label). - Scroll to Advanced settings: each topic is its own box. Checkboxes toggle custom fields below (thank-you URLs, contact mail, SMTP, auto-reply, multi-email forward). Configure those, then click Save Form.
- Database caveat: new custom column names must appear in
wckd-forms/app/config/app.phpundersubmissions.allowed_columnsor intake will not store them; coordinate with whoever maintainsapp.phpwhen you introduce newwf_*fields.
You paste the same PHP the docs describe, generated for the active key.
- Stay on Settings → Forms for the selected template.
- Copy the head snippet into your site layout once per page.
- Copy each body snippet into placements; edit the placement label string before saving the theme file.
You centralize reusable field definitions when your build wires them into the form UI.
- Open Settings → Form Fields.
- Click Add field, fill the overlay, and save to add a definition under Your fields.
- Use Edit or Delete on each row to change or remove a custom definition. Core fields are read-only reference.
- Update schemas that should reference the new definitions (developer step).
You introduce a new registry key backed by a new schema file.
- Copy an existing file in
wckd-forms/forms/schemas/to a new filename. - Edit the new schema: adjust labels, field names, and
db_columnvalues following patterns from the file you copied. - Add a new entry to
wckd-forms/forms/registry.phpwith a unique key pointing at the new schema path. - Deploy the PHP files to the server.
- Open Settings → Forms, select the new key, set mail and URLs, then save.
- Embed with
wckd_form('your_new_key', 'Placement label');and run the verification step below.
Operators change password or display name without touching registry files.
- Viewers: open Settings → Profile, edit, then save.
- Managers and owners: open Settings → People & access, choose Edit on your row, then save.
- Sign out and back in if the UI prompts for a refreshed session.
You confirm intake accepts the schema and the dashboard lists the submission.
- Submit once from a page that embeds the key you changed.
- Expect a thank-you redirect without a
?wckd=error query. - Open Leads and confirm a row exists with the placement label you passed to
wckd_form().
- Intake rejects the submission: registry path typo or schema mismatch; compare
forms/registry.phpto files on disk. - Allowed columns error after schema change: new field names are not listed in
submissions.allowed_columnsinsidewckd-forms/app/config/app.php; align the schema with that list or extend the list through the path your build documents. - Duplicate placement labels: two calls use the same second argument; pick distinct labels per placement for reporting.
- Embed forms:
wckd_form_init()and arguments. - Routing & URLs: submit and thank-you targets.
- Notifications: department vs directory routing for staff mail.
- Troubleshooting: unknown schema and intake errors.