# Required Fields based on conditional logic

**URL:** https://community.glideapps.com/t/required-fields-based-on-conditional-logic/41875
**Category:** Ask for Help
**Created:** [May 11, 2022, 9:58pm UTC](https://community.glideapps.com/t/required-fields-based-on-conditional-logic/41875 "2022-05-11T21:58:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![BobbyG77](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@BobbyG77](https://community.glideapps.com/u/BobbyG77)
#### Post date: [May 11, 2022, 9:58pm UTC](https://community.glideapps.com/t/required-fields-based-on-conditional-logic/41875/1 "2022-05-11T21:58:32Z")

</div>

I have created an app for HVAC processes in servicing residential customers. One Choice field prompts the user to select the **Total Number of Floors** in the house (1, 2 or 3). Since all homes have at least one floor, questions related to the first floor (wall square footage - north, east, west and south, numbers of windows, etc.) are always visible - and many of them are “required.”

Visibility of the same question fields, related to the 2nd and 3rd floors, is controlled by the **Total Number of Floors** data value selected. In other words, 2nd Floor questions are only visible when the **Total Number of Floors** is 2, etc.

My question is how to make the appropriate data gathered about floors 2 and 3 “required.” If I make a 2nd floor field “required,” but it is not visible to the user, then it is not possible to Add the record. Are there any workarounds for this?

Thanks in advance.

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [May 11, 2022, 10:40pm UTC](https://community.glideapps.com/t/required-fields-based-on-conditional-logic/41875/2 "2022-05-11T22:40:57Z")

</div>

The last I remember is that you can mark a field as required, but if the visibility conditions hide it, then it will not be required. As long as you are making the fields for floors 2 and 3 visible only when the chosen floor is 2 or 3, then there shouldn’t be a problem if the required flag is set for those fields.

Are you saying that even if those fields are hidden, the required flag is still preventing you from submitting?

---

<div class="post-metadata">

### Author: ![BobbyG77](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@BobbyG77](https://community.glideapps.com/u/BobbyG77)
#### Post date: [May 12, 2022, 7:39pm UTC](https://community.glideapps.com/t/required-fields-based-on-conditional-logic/41875/3 "2022-05-12T19:39:02Z")

</div>

Jeff, thank you for your reply. I will test it more. I assumed that it would enforce the required condition even if the fields were not visible (due to being associated with floors 2 and 3).
