We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Adding a newsletter email signup form with Publii on Netlify hosting

  • #11267
    Avatar photo[anonymous]

    For those searching on adding a newsletter email signup form to any Publii site (and using Netlify to host your site)

    You can use Netlify Forms. My mind was blown at how easy this was.

    Go to “source code” in the WYSIWYG editor and add:

    <form action="/signedup" method="POST" data-netlify="true"><p class="align-center"><label><input name="email" type="email" placeholder="enter email for newsletter"></label> <button type="submit">Signup</button></p></form>
    • MAKE sure to add a post page with link “signedup” [which would be] in this example if you want visitor directed to a custom success message after the submit button is clicked
    • Or customize your own link in the form’s action attribute above, such as action=”/newsletter-success”
    • You can also customize the default text shown in the text field by editing the placeholder attribute above, such as placeholder=”email address”
    • NOW deploy your site to Netlify from Publii
    • THEN go to Netlify forms and enable the auto form search.
    • That’s it. All your email signups now go to netlify, 100 free/month is great for small nonprofits etc.

    Hope this helps someone.

    Avatar photo[anonymous]

    Thank you for sharing this, Jinx! This is a great step-by-step for anyone using Netlify for forms.

    There have been a few previous threads in the forum that also touched on how to set up forms (some services even offer more than 100 form submissions a month 😉):

    Avatar photo[anonymous]

    I will say, though: if the goal is to collect emails for a newsletter/mailing list, I’d recommend using a dedicated newsletter service (ie: Mailerlite, Brevo, Audienceful, MailChimp, Listmonk, etc.) and embedding their provided form. This way, you don’t have to constantly copy over new contacts from Netlify to your mass email service (if you already use one), and you can leverage all the benefits of using a dedicated service vs sending campaigns from your personal email service (which typically isn’t suited for mass emails).