Please note this document covers functionality added in Caldera Forms version 1.4
When setting up the Caldera Forms email notification it is important to check that your settings are translating into the intended values when the email message is created by Caldera Forms. This is especially true when setting field values using Caldera Forms magic tags.
Caldera Forms email previews let you check that what should be happening is really happening with email settings. If you are experiencing problems with your emails not sending or not sending properly, the first step is to check that the email preview looks right. If not, then you should ensure that your server is able to send emails, or consider using a third-party service to send your emails.
Enabling Email Preview Mode
You can enable email preview mode by checking the Save Preview setting in the Email Notification settings at the bottom of the Email tab of the form editor.
Once you check this box a Preview Last Email button will appear at the top of the form editor. Please note that you must submit the form once to generate an email preview. If you click the “Preview Last Email” button before saving your form and submitting the form you will see an error message since no previewed email exists.
Creating An Email Preview
To capture an email preview, make sure the Save Preview option is checked and then save your form by clicking the Save Form button. Then load your form using the Caldera Forms shortcode or by clicking the Preview Form button.
Then submit your form once and return to the form editor. Keep in mind that Caldera Forms only saves the last email in a previewable manner. Every new preview, for each form, erases the last generated preview. Also, please note that you must be logged in as an administrative user when you submit the form or no preview will be generated.
Viewing The Email Preview
After you have submitted your form, while email preview mode is enabled, while logged in as an administrator, return to the form editor. From the form editor, click the Preview Last Form button.
This should show you an email preview. It may also show you an error that no preview could be found. If an email preview was captured, then you will see something like this:
On this screen you will see the headers for the message at the top and the body of the message at the bottom. In the top section you should see “Recipients,” “Subject” and “All.” The all section shows all email headers.
The bottom section shows the HTML preview of the message.
What If No Email Preview Is Shown?
If you do not see an email preview and you have submitted the form you are trying to preview while preview mode is on while logged in as an administrative user, than most likely form submission is not completing. This is likely due to a PHP or JavaScript error.
At this point, you should attempt to uncover and fix any errors you are having. To do so, submit the form with your JavaScript console open and with WordPress debug logging on. If you need help fixing the errors you find, please open a support ticket and include all errors.
- Learn how to check your JavaScript console in any browser
- How to use the WordPress debug log to find hidden errors
- WordPress Codex Page On Debugging Basics