# Conditional mandatory/required form field & document upload

**URL:** <https://community.noloco.io/t/conditional-mandatory-required-form-field-document-upload/1711>\
**Category:** Ask for Help\
**Created:** [February 19, 2025, 9:39am UTC](https://community.noloco.io/t/conditional-mandatory-required-form-field-document-upload/1711 "2025-02-19T09:39:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukebranford](https://dub1.discourse-cdn.com/flex005/user_avatar/community.noloco.io/lukebranford/32/32_2.png) [@lukebranford](https://community.noloco.io/u/lukebranford)\
**Post date:** [February 19, 2025, 9:39am UTC](https://community.noloco.io/t/conditional-mandatory-required-form-field-document-upload/1711/1 "2025-02-19T09:39:22Z")

</div>

I have a form with two fields:

- URL
- Doc upload

I need to make the URL field mandatory/required _unless_ the user uploads a document. But the conditional function doesn’t seem to work with documents, i.e. I add a document in the form but the URL field is still marked as mandatory - I guess this is because the document record has not yet been created?

Any way round this? I know I could put the other way around, just makes slightly less sense from a UX perspective (but will do that if no other option).

Thanks!

---

<div class="post-metadata">

**Author:** ![lukebranford](https://dub1.discourse-cdn.com/flex005/user_avatar/community.noloco.io/lukebranford/32/32_2.png) [@lukebranford](https://community.noloco.io/u/lukebranford)\
**Post date:** [February 20, 2025, 10:57am UTC](https://community.noloco.io/t/conditional-mandatory-required-form-field-document-upload/1711/2 "2025-02-20T10:57:32Z")

</div>

@darragh would it just be easiest for me to do this the other way around for now?

---

<div class="post-metadata">

**Author:** ![darragh](https://dub1.discourse-cdn.com/flex005/user_avatar/community.noloco.io/darragh/32/12_2.png) [@darragh](https://community.noloco.io/u/darragh)\
**Post date:** [February 20, 2025, 11:21am UTC](https://community.noloco.io/t/conditional-mandatory-required-form-field-document-upload/1711/3 "2025-02-20T11:21:38Z")

</div>

I think so @lukebranford - but we’ll definitely look into the ability to use file-fields in conditions
