# Required fields when hidden

**URL:** <https://community.glideapps.com/t/required-fields-when-hidden/28882>\
**Category:** Ask for Help\
**Created:** [July 9, 2021, 7:54am UTC](https://community.glideapps.com/t/required-fields-when-hidden/28882 "2021-07-09T07:54:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![felixvona](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/felixvona/32/16028_2.png) [@felixvona](https://community.glideapps.com/u/felixvona)\
**Post date:** [July 9, 2021, 7:54am UTC](https://community.glideapps.com/t/required-fields-when-hidden/28882/1 "2021-07-09T07:54:53Z")

</div>

I have a form with multiple text and number entries that are required. (1,2,3,4,5…)

In order to visually separate them, I made a choice component (A,B,C) that shows only the selected few entry fields (1,2,3,4,5…) based on the choice selected (A,B,C) - by changing the visibility settings of each text entry.

But then when the first “tab” (A) is completed, you can submit the form, even though “tabs” B and C are not completed (even though they also have required fields).

Is there a way to change this? To be able to submit only when all the required entry fields are filled, even though they are not all visible?

I’ve seen the similar topic asking for the opposite of what I’m asking for ([Hidden Required Entry Fields](https://community.glideapps.com/t/hidden-required-entry-fields/2401)) but I’d also like the option for fields to be required even when not visible.

So, to have the option to choose if the field is required, or required even if not visible.

Or is there another way to visualy separate items (in different screens so to speak) not using the choice componeny that hides some of the items? (Doing that with buttons don’t really work in the form in my experience)

Thank you!

---

<div class="post-metadata">

**Author:** ![Simon\_Hill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/simon_hill/32/94730_2.png) [@Simon\_Hill](https://community.glideapps.com/u/Simon_Hill)\
**Post date:** [July 9, 2021, 8:13am UTC](https://community.glideapps.com/t/required-fields-when-hidden/28882/2 "2021-07-09T08:13:15Z")

</div>

I have a hunch you need to stop using forms, which has the frustrating feature of not being able to control when it is submitted. Instead, do the following:

Replace your button that opened the form with a standard button. For the button’s action, create a custom action which will open a new screen.

On the new screen you can then add all the components you need for your regular form, playing with visibility arguments based on what the user has selected.

In order to simulate submitting the form you should add a final button at the bottom of the screen (or perhaps a floating button). This button should only become visible when criteria are met, e.g. the elements of the form you require are completed.

Next, create a custom action for this ‘submission’ button. The action will start by adding a row to the sheet you normally use to submit a form. This blank row can then be populated with a set columns action, e.g. you will push the values from the ‘form’ into the new row. The final step will be ‘go back’, which will simulate submitting the form… you can also a custom notification ‘Submitted!’ to confirm to the user.

Hope this helps…

---

<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:** [July 9, 2021, 11:56am UTC](https://community.glideapps.com/t/required-fields-when-hidden/28882/3 "2021-07-09T11:56:11Z")

</div>

> [@How do I create a custom form?](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014):
>
> I’m just dropping this here so I have something to refer people to when they ask. This is a simple concept app (copyable), that demonstrates the following techniques: Building custom forms for adding and editing list items (as an alternative to the native forms provided by Glide) Preventing duplicate new entries using [User Specific Columns](https://docs.glideapps.com/all/reference/data-editor/user-specific-columns) and [Relations](https://docs.glideapps.com/all/reference/data-editor/computed-columns/relation-column) Enforcing mandatory input items The use of visibility conditions and user specific booleans to control user flow There is nothing particula…

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 9, 2021, 1:27pm UTC](https://community.glideapps.com/t/required-fields-when-hidden/28882/4 "2021-07-09T13:27:34Z")

</div>

If clients insist on a form I use CSS to control the submit button.

```auto
<pre><span><style>

[data-test="nav-button-Submit"] {
pointer-events: none;
opacity: 0.4;
}

```

Then I can conditionally control when to make this “visible”.

---

<div class="post-metadata">

**Author:** ![mrt224](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mrt224/32/490_2.png) [@mrt224](https://community.glideapps.com/u/mrt224)\
**Post date:** [September 25, 2021, 3:48pm UTC](https://community.glideapps.com/t/required-fields-when-hidden/28882/5 "2021-09-25T15:48:25Z")

</div>

How would you use:

```
[data-test="nav-button-Submit"] { pointer-events: none; opacity: 0.4; } with conditional control to make visible?
```

---

<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:** [September 25, 2021, 3:57pm UTC](https://community.glideapps.com/t/required-fields-when-hidden/28882/6 "2021-09-25T15:57:41Z")

</div>

You can put a visibility condition on the rich text component to hide or show it, which would make the CSS activate or deactivate.

---

<div class="post-metadata">

**Author:** ![mrt224](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mrt224/32/490_2.png) [@mrt224](https://community.glideapps.com/u/mrt224)\
**Post date:** [September 25, 2021, 6:38pm UTC](https://community.glideapps.com/t/required-fields-when-hidden/28882/7 "2021-09-25T18:38:55Z")

</div>

That works perfect.  
Thank you!
