# Make a dependent field required if answer is YES

**URL:** <https://community.hubspot.com/t/make-a-dependent-field-required-if-answer-is-yes/4027>\
**Category:** CMS Development\
**Created:** [November 28, 2017, 10:02pm UTC](https://community.hubspot.com/t/make-a-dependent-field-required-if-answer-is-yes/4027 "2017-11-28T22:02:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikemiller](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mikemiller/32/76463_2.png) [@mikemiller](https://community.hubspot.com/u/mikemiller)\
**Post date:** [November 28, 2017, 10:02pm UTC](https://community.hubspot.com/t/make-a-dependent-field-required-if-answer-is-yes/4027/1 "2017-11-28T22:02:41Z")

</div>

I would like to have a Yes No radio button field on a form and if the answer is yes have a dependent field required. It seems the required flag only requires an answer on the Radio Button field. I tried setting both the radio button and the document field required but it let me submit without attaching a file. Specifically I am asking the question “do you have form xyz to attach?” if the answer is yes then I want the user to be required to attach a file. I have searched the community for awhile and do not see this question. Any help would be greatly apprecited

---

<div class="post-metadata">

**Author:** ![TRooInbound](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/trooinbound/32/89545_2.png) [@TRooInbound](https://community.hubspot.com/u/TRooInbound)\
**Post date:** [November 29, 2017, 7:26am UTC](https://community.hubspot.com/t/make-a-dependent-field-required-if-answer-is-yes/4027/2 "2017-11-29T07:26:06Z")

</div>

Hi @mikemiller,

I just try out your problem on my portal and it’s work perfectly

look out GIF

![Form Dependent TRooInbound.gif](https://d2qpr2jzcazej7.cloudfront.net/original/3X/f/9/f920b0437528cf400d66a360359f9c87e95b2b2f.gif)

let us know you done something else

Team TRooInbound

---

<div class="post-metadata">

**Author:** ![edjusten](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/edjusten/32/14475_2.png) [@edjusten](https://community.hubspot.com/u/edjusten)\
**Post date:** [November 29, 2017, 7:44pm UTC](https://community.hubspot.com/t/make-a-dependent-field-required-if-answer-is-yes/4027/3 "2017-11-29T19:44:14Z")

</div>

Hi @mikemiller . I can confirm @TRooInbound 's finidngs. You will need to require both fields. If the answer is _No_ the form will submit. If the answer is yes, the form will not submit unless a file is uploaded.

Thank you,

Ed Justen

---

<div class="post-metadata">

**Author:** ![TRooInbound](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/trooinbound/32/89545_2.png) [@TRooInbound](https://community.hubspot.com/u/TRooInbound)\
**Post date:** [November 30, 2017, 5:02am UTC](https://community.hubspot.com/t/make-a-dependent-field-required-if-answer-is-yes/4027/4 "2017-11-30T05:02:53Z")

</div>

Hi @edjusten,

Thanks for supporting  
 ![16x16_smiley-very-happy.png.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/a/a83ec960612094a57cfb392e21c202c8e77b967c.png)

---

<div class="post-metadata">

**Author:** ![mikemiller](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mikemiller/32/76463_2.png) [@mikemiller](https://community.hubspot.com/u/mikemiller)\
**Post date:** [November 30, 2017, 9:17pm UTC](https://community.hubspot.com/t/make-a-dependent-field-required-if-answer-is-yes/4027/5 "2017-11-30T21:17:41Z")

</div>

Hi

Thanks for the response. I am not sure what I was doing wrong the other day but given your assurance it would work as I desired I returned to my form and tried again and it works the way I want it to. I appreciate the help.
