Tutorial: Email Notifications
Form Preview

What You'll Build

Forms that notify you via email when someone submits. You'll receive an email with the submission details - perfect for contact forms, lead capture, and support requests.

💡 Tip:
Email notifications are sent automatically on every form submission - no configuration required. However, using configureOwnerEmailNotification() lets you customize the subject line and add specific fields to the email body.

What You'll Learn

  • How to enable email notifications with configureOwnerEmailNotification()
  • Setting dynamic email subjects based on form values
  • Selecting which fields to include in the notification
  • Combining email notifications with PDF generation
⭐

PRO Feature

Email notifications are available on Pro plans. The form builder runs the notification configuration on the client, serializes the result, and sends it with the submission.

Tutorial Steps

Step 1: Basic Email Notification

Use configureOwnerEmailNotification() to set up email notifications. The builder function receives an email object with two methods:

  • setSubject(subject) - Set the email subject line
  • addField(label, value) - Add a field to the email body
💡 Tip:
When someone submits this form, you'll receive an email with the subject "New Contact Form Submission" and a formatted list of fields.

Step 2: Dynamic Subject Lines

Make your email subjects more informative by including form values. This helps you quickly identify and prioritize submissions from your inbox.

💡 Tip:
Use template literals to combine static text with form values. Adding urgency prefixes like "[URGENT]" helps high-priority items stand out.

Step 3: Selective Field Inclusion

You don't have to include every form field in the email. Choose what's relevant and skip empty optional fields to keep emails concise.

💡 Tip:
Use conditional logic to only include optional fields when they have values. This keeps your notification emails clean and easy to read.

Step 4: Email + PDF Combination

Email notifications work great alongside PDF generation. You get notified of submissions, and your users get a downloadable confirmation.

💡 Tip:
This pattern is perfect for quote requests, registrations, and applications - you receive the details by email while the user gets a professional PDF receipt.

API Reference

configureOwnerEmailNotification(builder)

Configures email notification sent to the form owner when someone submits.

EmailBuilderTs Methods

  • setSubject(subject: string) - Set the email subject line
  • addField(label: string, value: string | number | null | undefined) - Add a labeled field to the email body

Try It Yourself

  • Challenge 1: Add a timestamp to the email subject
  • Challenge 2: Format phone numbers before adding them to the email
  • Challenge 3: Create a booking form that emails you the selected date and time

Next Steps

You've learned how to get notified when forms are submitted! Explore more advanced features:

Learn PDF Generation

Key concepts learned:

  • configureOwnerEmailNotification(builder) - Enable email notifications
  • email.setSubject() - Set dynamic subject lines
  • email.addField() - Include form data in emails
  • Combining notifications with PDF generation
👁️
No form selected
Select a form from the library to preview it