# Custom consent form

**URL:** <https://community.piwik.pro/t/custom-consent-form/3252>\
**Category:** API & integrations\
**Created:** [November 16, 2023, 2:40pm UTC](https://community.piwik.pro/t/custom-consent-form/3252 "2023-11-16T14:40:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dandan](https://avatars.discourse-cdn.com/v4/letter/d/a87d85/32.png) [@dandan](https://community.piwik.pro/u/dandan)\
**Post date:** [November 16, 2023, 2:40pm UTC](https://community.piwik.pro/t/custom-consent-form/3252/1 "2023-11-16T14:40:21Z")

</div>

Hi all!

Anyone has some working code for a Custom consent form they want to share? We’re experiencing issues with the example ones. When one refreshes the page the consent box doesn’t show again. We need it to persist

---

<div class="post-metadata">

**Author:** ![Oliwer\_Kaczmarek](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/oliwer_kaczmarek/32/3888_2.png) [@Oliwer\_Kaczmarek](https://community.piwik.pro/u/Oliwer_Kaczmarek)\
**Post date:** [November 17, 2023, 11:40am UTC](https://community.piwik.pro/t/custom-consent-form/3252/2 "2023-11-17T11:40:54Z")

</div>

Hi @dandan,

I recommend checking whether [getNewComplianceTypes](https://developers.piwik.pro/en/latest/consent_manager/js_api/index.html#get-compliance-settings) method returns an empty array or not. If the array have any element in it load the consent again.

Best,  
Oliwer
