diff --git a/src/_includes/macros/form.njk b/src/_includes/macros/form.njk
index 88bbd30..43b968b 100644
--- a/src/_includes/macros/form.njk
+++ b/src/_includes/macros/form.njk
@@ -142,7 +142,7 @@
{% if option.value %}
diff --git a/src/_includes/partials/components/contact-form.njk b/src/_includes/partials/components/contact-form.njk
index 1a7915c..01dcccc 100644
--- a/src/_includes/partials/components/contact-form.njk
+++ b/src/_includes/partials/components/contact-form.njk
@@ -31,9 +31,9 @@
{{ label("Votre message", "message") }}
{{ textarea( "message", { required: true, autocapitalize: "sentences", spellcheck: "true" } ) }}
- {#
- {{ checkboxes("", "field-checkbox-name", [ "Je souhaite être tenu au courant de l’actualité Astrolabe"], { description: "" } ) }}
- #}
+
+ {{ checkboxes("", "subscribe", [ "Je souhaite être tenu au courant de l’actualité Astrolabe"], { description: "" } ) }}
+
{#
#}
diff --git a/src/form/contact-form-handler.php b/src/form/contact-form-handler.php
index 512e5eb..ae9b34d 100644
--- a/src/form/contact-form-handler.php
+++ b/src/form/contact-form-handler.php
@@ -10,6 +10,7 @@
$emailAddress = $_POST['email'];
$select = $_POST['select'];
$message = $_POST['message'];
+ $subscribe = $_POST['subscribe'];
if (!filter_var($emailAddress, FILTER_VALIDATE_EMAIL)) {
$errors .= "\n Error: Invalid email address $emailAddress";
@@ -53,6 +54,11 @@
// send the email
mail($to, $emailSubject, $emailBodyHTML, implode("\r\n", $headers));
+
+ // if subscribe add to mailing list
+ if(!empty($subscribe)) {
+ // process
+ }
// redirect to the 'thank you' page
header("Location: /thank-you/index.html");