---
title: "How to use MailChimp with HBook?"
canonical: "https://maestrel-resource-center.refined.site/space/KB/48332973/How%20to%20use%20MailChimp%20with%20HBook%3F"
format: markdown
---
May I have a MailChimp newsletter subscription checkbox in the form?

We currently don't have an integration with MailChimp within HBook. However, you can proceed as follows for adding a MailChimp newsletter subscription checkbox to the booking details form.

1. Create MailChimp Basic Account
2. Install MC4WP Basic Plugin : [https://wordpress.org/plugins/mailchimp-for-wp/](https://wordpress.org/plugins/mailchimp-for-wp/)
3. Enable the custom integration in the plugin as per instructions here [https://www.mc4wp.com/kb/subscribe-mailchimp-custom-html-form/](https://www.mc4wp.com/kb/subscribe-mailchimp-custom-html-form/)
4. Use the "hb_policies_area_markup" HBook filter to add your custom code. Here is an example of the code you could add to your child theme's functions.php

```
function add_mailchimp_to_details_form( $output ) {
    $output .= '<h3 class="hb-title hb-title-terms">Our newsletter</h3>';
    $output .= '<p>';
    $output .= '<label>';
    $output .= '<input type="checkbox" name="mc4wp-subscribe" value="1" />';
    $output .= 'Yes! Subscribe me to your newsletter.</label>';
    $output .= '</p>';
    return $output;
}

add_filter( 'hb_policies_area_markup', 'add_mailchimp_to_details_form' );
```