Responsive form
- In LaPosta » Relaties » Verrijken » 3. Zelf vormgeven van aanmeldformulier » [Beginnen]
- Klik: “Meer informatie over vormgeven met behulp van html/css”
- Copy the top part between the <Form> tags into a code field or html widget. In the example below, the xxxxxxxxxx represents the list-id, you need to search and replace it with the ID that is provided, Example:
Example:
<form method="post" action="https://facgenoten.email-provider.nl/subscribe/post/index.php" accept-charset="utf-8" class="form-xxxxxxxxxx">
<input type="hidden" name="next" value="" />
<input type="hidden" name="a" value="y62mtuscwx" />
<input type="hidden" name="l" value="xxxxxxxxxx" />
<label for="id-ivrFH3Mbhv">E-mailadres *</label><input name="ivrFH3Mbhv" id="id-ivrFH3Mbhv" type="email" required>
<label for="id-HDwtT0eQfq">Voornaam *</label><input name="HDwtT0eQfq" id="id-HDwtT0eQfq" type="text" required>
<input autocomplete="new-password" type="email" id="email" name="email" placeholder="Your e-mail here" style="position:absolute;top:-9999px;left:-9999px;">
<input type="submit" value="Aanmelden" />
</form>
Code language: HTML, XML (xml)
Then use the following css.
/* -- START LaPosta Opt-In form -- */
@media only screen and (max-width: 1035px) {
.form-xxxxxxxxxx {
flex-direction: column;
align-items: unset !important;
}
}
.form-xxxxxxxxxx {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
column-gap: 0.5em;
}
.form-xxxxxxxxxx label {
color: #fff;
display: block;
padding: 0;
}
.form-xxxxxxxxxx fieldset {
border: 0;
}
.form-xxxxxxxxxx fieldset label {
display: inline;
padding: 0;
}
.form-xxxxxxxxxx input[type=text], .form-xxxxxxxxxx input[type=email], .form-xxxxxxxxxx input[type=number] {
height: 2em;
padding: 0 0.5em;
font-size: 100%;
color: #000;
}
.form-xxxxxxxxxx input[type=submit] {
background-color: #fe82a7;
height: 2em;
padding: 0 2em;
font-size: 100%;
font-weight:bold;
border-radius: 5px;
}
.form-xxxxxxxxxx input[type=submit]:hover {
color: #fff;
}
/* client side validation */
.form-xxxxxxxxxx input:invalid {
border: 2px dashed red;
border-radius: 5px;
}
.form-xxxxxxxxxx input:invalid:required {
border: 0 solid #000;
}
.form-xxxxxxxxxx input:valid {
border: 0 solid #000;
}
/* -- END LaPosta Opt-In form -- */
Code language: CSS (css)
Column form
Add this CSS
/* -- START styling Laposta optin -- */
.hws-laposta-field {
background-color: #FFFFFF !important;
border-color: #045600 !important;
width: 100% !important;
border-radius: 0 !important;
font-size: 16px;
font-family: inherit;
color: #000000 !important;
padding: 0.8em !important;
margin-top:.5em!important;
margin-bottom: 15px !important;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.hws-laposta-button {
background-color: #045600 !important;
border-color: #045600 !important;
border-radius: 0 !important;
font-size:13.333px !important;
padding:7px !important;
width:100% !important;
}
/* -- END styling Laposta optin -- */
Code language: CSS (css)
And add the classes to the form like this:
<form method="post" action="https://saenliefde.email-provider.nl/subscribe/post/index.php" accept-charset="utf-8">
<input type="hidden" name="next" value="" />
<input type="hidden" name="a" value="e5gpeah9v3" />
<input type="hidden" name="l" value="7t64bxlmiq" />
<label for="id-Z9jYX1kkNm">Voornaam *</label><br><input class="hws-laposta-field" type="text" name="Z9jYX1kkNm" id="id-Z9jYX1kkNm" placeholder="Voornaam"><br>
<label for="id-7SYYyir7DS">E-mailadres *</label><br><input class="hws-laposta-field" type="text" name="7SYYyir7DS" id="id-7SYYyir7DS" placeholder="E-mailadres"><br>
<input autocomplete="new-password" type="email" id="email" name="email" placeholder="Your e-mail here" style="position:absolute;top:-9999px;left:-9999px;">
<input class="et_pb_button hws-laposta-button" type="submit" value="Aanmelden" />
</form>
Code language: HTML, XML (xml)