jfb-action-messages
JetFormBuilder: custom messages from a Form Action
JFB has a centralized form-message system (the _jf_messages post meta + Manager class). Every form ships with a Messages panel where the admin can override the canonical message keys (success, failed, validation_failed, invalid_email, empty_field, internal_error, etc.). A custom action can hook into this system in two distinct ways, and the right choice depends on where the admin should configure the text.
This skill documents both mechanisms, explains when to use which, and shows the exact PHP+JS plumbing for each. Read it together with the jfb-form-action skill — that one covers the action class itself; this one is the message layer on top.
API stability note
The form-messages Manager, the 'jet-form-builder/form-messages/register' filter, the Base_Action_Messages abstract class, the Action_Exception lookup behavior, the Messages_Manager::dynamic_success() prefix convention, and the 'jet-form-builder/form-handler/after-send' hook were all observed in JFB 3.5.x and are stable across the 3.x line. The plugin-version-tested value records last end-to-end verification only.
When to use this skill
- A custom action needs to surface a user-facing message that the admin can configure (success, "already exists", "duplicate skipped", API-error fallback, etc.).
- The diff/files contain
Action_Exception,Base_Action_Messages,'jet-form-builder/form-messages/register',add_context_oncewith a message-like value, orMessages_Manager::dynamic_success. - The user mentions "custom message" together with a JFB action.