Notifications, messages and redirects
4 min read
These settings sit in the After submitting card of the form editor (Create a form).
Email me about entries
Turn on Email me about entries ("Sends a short email with a link to each new entry.") and choose where it goes in Send to ("Leave empty for the site's admin email address."). The address of Settings › General › Administration Email Address is used when the box is empty.
Every saved entry sends one plain-text email through wp_mail():
- Subject:
[Your Site Name] New entry: Form title - Body:
The form "Form title" was submitted.
View the entry: https://example.com/wp-admin/post.php?post=123&action=editThe link depends on the kind:
Kind | Link opens |
|---|---|
Post | the post's edit screen (also for a guest's post; a guest cannot open it, you can) |
Data table entry | the new row in Data Tables ( |
User profile, User registration | the user's edit screen |
Things to know:
- The email does not contain the submitted values: they could be private, and the link shows them where you are logged in.
- Nothing is sent when an entry is refused. Edits of a post and profile updates send the email too.
- The email goes to you, not to the visitor. There is no confirmation email for visitors, except the "Email a link to set it" mode of a registration form, which makes WordPress send its Login Details email.
- An invalid address typed in Send to is cleared when you save the form and the admin email is used instead.
- Delivery depends on your site's mail setup (
wp_mail()). Use an SMTP plugin if you do not receive the mail. - Several addresses are not supported in Send to. Use a forwarding address or a mail plugin for more recipients.
Success message
Success message is shown after a successful submission. It is plain text; HTML tags are removed. Left empty, the default is:
Kind | Default |
|---|---|
Post, Data table entry | "Thank you! Your entry has been received." |
User profile | "Your profile has been updated." |
User registration | "Your account has been created." |
How it shows:
- After the redirect the page displays the message in a notice box where the form was.
- For a form that creates something (new post, new row, new account) the notice replaces the form. For a form that edits (an existing post, a profile) the notice is shown above the form, which stays.
- The message appears once: it is kept for 10 minutes under a random code in the address (
?wpmcf_done=...), and reading it removes it. A reload, another visitor or an old bookmark does not show it. - If something small went wrong after saving, for example a file that could not be stored, the problem sentence is appended to the message.
Redirect to
Redirect to ("Optional address on this site shown instead of the message.") sends the visitor to a thank-you page instead.
- The address must be on your site (same host). Saving a form with another host is refused: "The redirect URL must be an address on this site."
- When a redirect is set, no success message is shown; your thank-you page shows what you want. With the redirect active the form's own page is not shown again after sending.
- If a file could not be stored the redirect is skipped and the message with the problem is shown instead.
Button label
Button label replaces the text of the submit button. Empty, the label depends on the form: Submit, Save changes (editing a post), Update profile or Create account.
When something is wrong: the error summary
A submission with problems is not saved. The same page is shown again with:
- a box at the top, Your entry was not sent:, that gets keyboard focus and lists every problem; each item links to its field;
- the fields marked invalid;
- everything the visitor typed, except passwords and files.
Messages you may see: "Enter a title.", ""City" is required.", ""Email" does not accept this value.", "The passwords do not match.", "The file for "CV" is not an allowed type.", and the security messages of Guests and spam protection. If an unexpected error happens while saving, the visitor sees "Something went wrong while saving your entry. Please try again later." and the error is logged under Settings › Health; the page keeps working.
For developers
After an entry is saved (and the email sent) the action wpmcf/forms/submitted fires with the form (FormDTO), the ID of the post, user or data table row, and the kind (post, user_profile, user_register or entry):
add_action( 'wpmcf/forms/submitted', function ( $form, int $object_id, string $kind ) {
if ( $form->key === 'quote_request' && $kind === 'entry' ) {
// send your own confirmation, call a CRM, ...
}
}, 10, 3 );See the actions reference.
Still stuck? Contact support