FormsLite.io Docs
  • Introduction
  • Getting Started
    • Setup
    • Settings
      • Custom Subject
      • Success Page
      • Custom Redirect
      • Captcha and Spam Protection
        • Honeypot
        • hCaptcha
        • Report Spam
      • Custom Reply-to Email
      • Custom From Name
    • Plus Features
      • Add CC Emails
      • Autoresponder
      • Notion Database Integration
      • Webhooks
      • Domain Whitelisting
    • Examples
  • Guides
    • HTML Only
    • HTML + JavaScript
    • Alpine.js
    • Svelte
    • Vue.js
    • React
Powered by GitBook
On this page
  1. Getting Started
  2. Settings

Custom Subject

Overview

You can customize the subject line of your notification emails. There are two ways to set up the email subject: with a pre-defined subject or a user-generated subject.

Pre-defined Subject

To use a pre-defined subject line, add a hidden input field with the name "subject" and the desired subject line as the value.

Example Code for Pre-defined Subject

<input type="hidden" name="subject" value="New Submission from FormsLite.io">

User-Generated Subject

To allow the user to specify the subject line, use a text input field with the name "subject".

Example Code for User-Generated Subject

<input type="text" name="subject">

Full Example with Both Options

Pre-defined Subject

<form action="https://api.formslite.io/submission" method="POST">
    <input type="hidden" name="access_key" value="ACCESS_KEY">
    <input type="hidden" name="subject" value="New submission on your site">
    <input type="text" name="name" required>
    <input type="email" name="email" required>
    <button type="submit">Submit Form</button>
</form>

User-Generated Subject

<form action="https://api.formslite.io/submission" method="POST">
    <input type="hidden" name="access_key" value="ACCESS_KEY">
    <input type="text" name="subject">
    <input type="text" name="name" required>
    <input type="email" name="email" required>
    <button type="submit">Submit Form</button>
</form>

Ensure the "name" attribute is set to "subject" to properly configure the email subject line in the notification emails.

PreviousSettingsNextSuccess Page

Last updated 11 months ago