Skip to main content
Eleventy outputs static HTML, so a plain <form> can post to your endpoint. The Public Key goes in a global data file so every template can use it.

1. Save your Public Key

Copy the Public Key from the Endpoint form’s General tab. Create a global data file inside your input directory’s _data folder:
_data/site.json
Anything in _data is available to every template as a variable named after the file—here, site.

2. Create the contact page

This example uses Nunjucks, but the {{ }} tags work the same in Liquid.
contact.njk

3. Create the thank-you page

thank-you.njk
Run npx @11ty/eleventy --serve, open /contact/, and send a test response. Confirm it appears in Submissions.

Good to know

  • Change layout: base.njk to the layout your site already uses.
  • While testing locally, the redirect points to site.url, so you will land on your live address. Temporarily set url to http://localhost:8080, or leave out the redirect field while you test.
  • To show a message without leaving the page, use the JavaScript example in your template.