# Code for popup form to implement on website

**URL:** <https://community.hubspot.com/t/code-for-popup-form-to-implement-on-website/36808>\
**Category:** CMS Development\
**Created:** [May 6, 2021, 9:37am UTC](https://community.hubspot.com/t/code-for-popup-form-to-implement-on-website/36808 "2021-05-06T09:37:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDSouza](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sdsouza/32/44643_2.png) [@SDSouza](https://community.hubspot.com/u/SDSouza)\
**Post date:** [May 6, 2021, 9:37am UTC](https://community.hubspot.com/t/code-for-popup-form-to-implement-on-website/36808/1 "2021-05-06T09:37:39Z")

</div>

I had created a popup from in Mailchimp and after changing to hubspot, I’d like to transfer my popup form to hubspot and then all the contacts/subscribers can be automatically added to our list. I was able to get a code for a normal form - but this doesn’t have popup styling. Then when I tried to create a popup form from the options, it didn’t give me the option to get a code. How do I publish this form on my website?

Secondly, can we add header images to a popup form?

---

<div class="post-metadata">

**Author:** ![albertsg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/albertsg/32/99473_2.png) [@albertsg](https://community.hubspot.com/u/albertsg)\
**Post date:** [May 6, 2021, 2:03pm UTC](https://community.hubspot.com/t/code-for-popup-form-to-implement-on-website/36808/2 "2021-05-06T14:03:44Z")

</div>

Hi @SDSouza , I’m not sure what exactly you get from Mailchimp, but I would suggest you using a **modal** element in your website (and including what you get from Mailchimp there). Modal elements are “popup” elements that are tiggered after some event, usually a click.

You can find more information here: [https://www.w3schools.com/howto/howto\_css\_modals.asp](https://www.w3schools.com/howto/howto_css_modals.asp)

---

<div class="post-metadata">

**Author:** ![SDSouza](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sdsouza/32/44643_2.png) [@SDSouza](https://community.hubspot.com/u/SDSouza)\
**Post date:** [May 10, 2021, 7:04am UTC](https://community.hubspot.com/t/code-for-popup-form-to-implement-on-website/36808/3 "2021-05-10T07:04:08Z")

</div>

The thing is I’d like to stop using MailChimp altogether and create a popup form on Hubspot. I’ve created a popup form on Hubspot, but I’m not sure how to get a code to integrate it onto our website.

---

<div class="post-metadata">

**Author:** ![albertsg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/albertsg/32/99473_2.png) [@albertsg](https://community.hubspot.com/u/albertsg)\
**Post date:** [May 10, 2021, 8:32am UTC](https://community.hubspot.com/t/code-for-popup-form-to-implement-on-website/36808/4 "2021-05-10T08:32:27Z")

</div>

Hi @SDSouza, you can add anything you want into a modal element. If you have the HTML code for the form, you can add it to the modal element and then use Javascript to control the modal behaviour. Check the link in my previous comment to see how to implement a modal element.

---

<div class="post-metadata">

**Author:** ![albertsg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/albertsg/32/99473_2.png) [@albertsg](https://community.hubspot.com/u/albertsg)\
**Post date:** [May 12, 2021, 7:23am UTC](https://community.hubspot.com/t/code-for-popup-form-to-implement-on-website/36808/5 "2021-05-12T07:23:39Z")

</div>

Hi again @SDSouza. Maybe I didn’t understand properly your initial question, but now that I’m reading it again, maybe it makes more sense for you to use the Hubspot Pop-up form functionality. You can find a step by step guide here: [https://knowledge.hubspot.com/pop-up-forms/create-pop-up-forms](https://knowledge.hubspot.com/pop-up-forms/create-pop-up-forms)  
With that you should be able to get rid of the Mailchimp script and use Hubspot’s tool.
