Building your own subscribe form with HTML
If you are familiar with HTML and CSS, you do not have to use the standard standalone or embedded subscribe form. Instead, you can build the form entirely yourself. This way, it seamlessly matches your website, or you can add extra features to the subscription process.
Go to Subscribers → your list → Enrich → Subscribe and select ‘Custom’ to design your own subscribe form.
You can set up the form there in two ways. In both cases, you create the design yourself, but the way the subscription is processed and validated differs:
- With plain HTML, without the API (this page).
- With the API: see Subscribeform with the API.
Building a subscribe form with plain HTML
In your account, you will find the plain HTML for your form, without CSS. This allows you to decide how the form looks yourself, without having to work with the API to add the data.
Leave the line with the validate.js script in place when you edit the HTML: this keeps the form protected against fake subscriptions.
Redirecting after subscribing with the next field
The URL to which a visitor is forwarded when the subscribe form has been filled in correctly. Enter your URL in the value attribute.
How are the fields validated?
The downside of plain HTML is that the fields are not validated via JavaScript. Laposta’s server validates the fields after submission. If there are no errors and you have specified a value for next, Laposta redirects the visitor to that URL.
If there are errors, they are listed on a simple HTML page. If you want to show the error messages differently, handle the errors yourself in JavaScript.