# Hide/disable a subfield in "alignment" field (custom module)

**URL:** <https://community.hubspot.com/t/hide-disable-a-subfield-in-alignment-field-custom-module/46528>\
**Category:** CMS Development\
**Created:** [November 5, 2021, 8:58am UTC](https://community.hubspot.com/t/hide-disable-a-subfield-in-alignment-field-custom-module/46528 "2021-11-05T08:58:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KeremKandirali](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/keremkandirali/32/11923_2.png) [@KeremKandirali](https://community.hubspot.com/u/KeremKandirali)\
**Post date:** [November 5, 2021, 8:58am UTC](https://community.hubspot.com/t/hide-disable-a-subfield-in-alignment-field-custom-module/46528/1 "2021-11-05T08:58:01Z")

</div>

Hi guys,

In a custom module, what should I do to hide/disable the CENTER option for the “type”: “alignment” field in fields.json file?

![alignment.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/b/9bfbd6ab9b4588c3ed6ecc7329181c6b416e73bf.png)

Meaning I’d like to see the LEFT and RIGHT option only.

I looked around for a hidden subfield but couldn’t find any. I assume it should be something like that:

```lia-code-sample
{
 "label": "Position Image",
 "name": "img_position",
 "type": "alignment",
 "alignment_direction": "HORIZONTAL",
 "visibility": {
 "hidden_subfields": {
 "???": true
 }
 },
 "default": { "horizontal_align": "LEFT" }
}

```

Any ideas?

---

<div class="post-metadata">

**Author:** ![Oezcan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/oezcan/32/53959_2.png) [@Oezcan](https://community.hubspot.com/u/Oezcan)\
**Post date:** [November 5, 2021, 3:49pm UTC](https://community.hubspot.com/t/hide-disable-a-subfield-in-alignment-field-custom-module/46528/2 "2021-11-05T15:49:19Z")

</div>

Hi @KeremKandirali ,

I’m not sure if this works the way you want it to, but I have an alternative for you here.

Try it here as in the example:

 ![Oezcan_0-1636127254718.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/a/7/a71282f5a92b4c9a3d18e8fbdb3d92f99c5a4088.jpeg)

Left:

 ![Oezcan_1-1636127278135.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/7/5718ef20a8b550bd50e535b43b3a16931f04fc89.jpeg)

Right:

 ![Oezcan_2-1636127319750.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/f/e/fe6893063ef3de66f69a0a0fd30d5e8d31c36609.jpeg)

Best regards

Özcan

---

<div class="post-metadata">

**Author:** ![KeremKandirali](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/keremkandirali/32/11923_2.png) [@KeremKandirali](https://community.hubspot.com/u/KeremKandirali)\
**Post date:** [November 5, 2021, 4:55pm UTC](https://community.hubspot.com/t/hide-disable-a-subfield-in-alignment-field-custom-module/46528/3 "2021-11-05T16:55:51Z")

</div>

Thank you very much Özcan, yeah, it seems the only solution is using a choice field.

---

<div class="post-metadata">

**Author:** ![Oezcan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/oezcan/32/53959_2.png) [@Oezcan](https://community.hubspot.com/u/Oezcan)\
**Post date:** [November 22, 2021, 8:53pm UTC](https://community.hubspot.com/t/hide-disable-a-subfield-in-alignment-field-custom-module/46528/4 "2021-11-22T20:53:53Z")

</div>

Hey @KeremKandirali ,  
I thought about your problem again and look if the middle button could be hidden somehow. But I couldn’t find a solution, even addressing the classes didn’t help. But I think it would be a good idea to write that down here as an [idea](https://community.hubspot.com/t5/Ideas/ct-p/ideas).  
Best regards  
Özcan
