# How to hide Hubl module text field if empty

**URL:** <https://community.hubspot.com/t/how-to-hide-hubl-module-text-field-if-empty/15533>\
**Category:** CMS Development\
**Tags:** design-tools\
**Created:** [July 30, 2019, 2:25pm UTC](https://community.hubspot.com/t/how-to-hide-hubl-module-text-field-if-empty/15533 "2019-07-30T14:25:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpburke](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cpburke/32/48852_2.png) [@cpburke](https://community.hubspot.com/u/cpburke)\
**Post date:** [July 30, 2019, 2:25pm UTC](https://community.hubspot.com/t/how-to-hide-hubl-module-text-field-if-empty/15533/1 "2019-07-30T14:25:49Z")

</div>

What Hubl expression do I need to add to hide the blog subscription title text if the field is empty? I know it can be done using boolean but haven’t been able to get it to work, so the H3 tag still shows up if the title is empty. Thanks in advance.

 ![Screen Shot 2019-07-30 at 9.19.23 AM.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/3/9355307adbb81afcb43a500fcf5cad2e4723d5f4.jpeg)

---

<div class="post-metadata">

**Author:** ![lscanlan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lscanlan/32/66262_2.png) [@lscanlan](https://community.hubspot.com/u/lscanlan)\
**Post date:** [August 20, 2019, 10:48pm UTC](https://community.hubspot.com/t/how-to-hide-hubl-module-text-field-if-empty/15533/2 "2019-08-20T22:48:57Z")

</div>

Hi @cpburke,

I don’t think it’s possible to remove that HTML from the blog subscription module. If you don’t include the title parameter, I believe you get the default value, which is “Subscribe Here!”. But you could include some CSS to make sure it doesn’t display under certain conditions, or some JS to remove it from the page altogether if you need to. So with CSS you could do something like:

```auto
{% if not module.title %}
 <style>
 .hs_cos_wrapper_type_blog_subscribe .form-title {
 display: none;
 }
 </style>
{% endif %}

```

Let me know if you have any questions about this.

---

<div class="post-metadata">

**Author:** ![derekcavaliero](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/derekcavaliero/32/24634_2.png) [@derekcavaliero](https://community.hubspot.com/u/derekcavaliero)\
**Post date:** [August 21, 2019, 2:01pm UTC](https://community.hubspot.com/t/how-to-hide-hubl-module-text-field-if-empty/15533/3 "2019-08-21T14:01:12Z")

</div>

@cpburke

@lscanlan 's solution will work, but you can make it more flexible by using the CSS pseudo **:empty** selector.

```auto
.hs_cos_wrapper_type_blog_subscribe .form-title:empty{
 display: none;
}

```

That way you don’t accidentally hide it in other scenarios where it may have content.

---

<div class="post-metadata">

**Author:** ![derekcavaliero](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/derekcavaliero/32/24634_2.png) [@derekcavaliero](https://community.hubspot.com/u/derekcavaliero)\
**Post date:** [August 21, 2019, 2:05pm UTC](https://community.hubspot.com/t/how-to-hide-hubl-module-text-field-if-empty/15533/4 "2019-08-21T14:05:32Z")

</div>

Whoops - missed his HUBL markup there - his will work perfectly fine as well. Mine is a pure CSS method whereas his is HUBL + CSS

---

<div class="post-metadata">

**Author:** ![RJChauhan](https://avatars.discourse-cdn.com/v4/letter/r/ebca7d/32.png) [@RJChauhan](https://community.hubspot.com/u/RJChauhan)\
**Post date:** [September 27, 2022, 10:10am UTC](https://community.hubspot.com/t/how-to-hide-hubl-module-text-field-if-empty/15533/5 "2022-09-27T10:10:36Z")

</div>

You just need to add like this, _h2 tag available only of it has the value_  
**{% if module.title %}**  
**\<h2 class=“heading m-0”\>**  
**{{ module.itle }}**  
**\</h2\>**  
**{% endif %}**
