# Forms: make depentend field only required when shown

**URL:** <https://community.hubspot.com/t/forms-make-depentend-field-only-required-when-shown/107933>\
**Category:** Lead Capture Tools\
**Tags:** forms\
**Created:** [May 24, 2024, 11:36am UTC](https://community.hubspot.com/t/forms-make-depentend-field-only-required-when-shown/107933 "2024-05-24T11:36:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![buerobert](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@buerobert](https://community.hubspot.com/u/buerobert)\
**Post date:** [May 24, 2024, 11:36am UTC](https://community.hubspot.com/t/forms-make-depentend-field-only-required-when-shown/107933/1 "2024-05-24T11:36:41Z")

</div>

When setting up forms I have a property A which can be ‘true’ or ‘false’. Property B should show up as a dependent field only when A = ‘true’ and should be required in this case.

However, B is required as well if A = ‘false’, i.e. the field is not even shown.

Is there a workaround I am missing?

---

<div class="post-metadata">

**Author:** ![Ben\_M](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ben_m/32/2679_2.png) [@Ben\_M](https://community.hubspot.com/u/Ben_M)\
**Post date:** [May 24, 2024, 11:42am UTC](https://community.hubspot.com/t/forms-make-depentend-field-only-required-when-shown/107933/2 "2024-05-24T11:42:44Z")

</div>

If I am understanding you correctly, B will always show on your form, but will only be required if A is true. If A is false, B is shown but becomes optional. Is that correct?

If so, I don’t believe that advanced logic exists today in Hubspot as a dependant field will show a field depending on the value of another, not change it’s required status.

---

<div class="post-metadata">

**Author:** ![buerobert](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@buerobert](https://community.hubspot.com/u/buerobert)\
**Post date:** [May 24, 2024, 11:48am UTC](https://community.hubspot.com/t/forms-make-depentend-field-only-required-when-shown/107933/3 "2024-05-24T11:48:03Z")

</div>

Hi Ben,  
B is only shown if A=true.

B should be required if A=true.

B should neither be shown nor required if A=false.

---

<div class="post-metadata">

**Author:** ![Ben\_M](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ben_m/32/2679_2.png) [@Ben\_M](https://community.hubspot.com/u/Ben_M)\
**Post date:** [May 24, 2024, 12:19pm UTC](https://community.hubspot.com/t/forms-make-depentend-field-only-required-when-shown/107933/4 "2024-05-24T12:19:02Z")

</div>

If B is still being required even if it is not shown, then this is a bug. I would recommend submitting a ticket into Hubspot support as if the property is not shown it cannot be required.

---

<div class="post-metadata">

**Author:** ![buerobert](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@buerobert](https://community.hubspot.com/u/buerobert)\
**Post date:** [May 24, 2024, 12:25pm UTC](https://community.hubspot.com/t/forms-make-depentend-field-only-required-when-shown/107933/5 "2024-05-24T12:25:31Z")

</div>

I found my mistake. One should not use data type ‘single checkbox’ for the required controlling property A… Scenario works as expected with other data types.
