# Make Switch/Checkbox component "required" possible?

**URL:** <https://community.glideapps.com/t/make-switch-checkbox-component-required-possible/59999>\
**Category:** Ask for Help\
**Created:** [April 1, 2023, 10:02pm UTC](https://community.glideapps.com/t/make-switch-checkbox-component-required-possible/59999 "2023-04-01T22:02:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dartiede](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dartiede/32/50216_2.png) [@dartiede](https://community.glideapps.com/u/dartiede)\
**Post date:** [April 1, 2023, 10:02pm UTC](https://community.glideapps.com/t/make-switch-checkbox-component-required-possible/59999/1 "2023-04-01T22:02:31Z")

</div>

Hey Gliders,

is it currently possible to make a switch/checkbox component in a add form required? My use case would be to accept GDPR agreement (EU) before someone can add/send something (e.g. a feature suggestion alongside their e-mail). The only workaround i could come up with, is to create a on submit custom action that checks if the switch is checked and if not the row get’s deleted immediately after it is sent.

I think UX wise it would be a little more elegant if the “Send” button in the bottom bar would only go active if the switch is checked.

Any ideas? Might be missing a different workaround? =)

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [April 2, 2023, 2:42am UTC](https://community.glideapps.com/t/make-switch-checkbox-component-required-possible/59999/2 "2023-04-02T02:42:21Z")

</div>

The workaround would be to use a custom form, and then keep the Submit button disabled while the related user specific boolean column is not checked.

---

<div class="post-metadata">

**Author:** ![dartiede](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dartiede/32/50216_2.png) [@dartiede](https://community.glideapps.com/u/dartiede)\
**Post date:** [April 2, 2023, 10:08am UTC](https://community.glideapps.com/t/make-switch-checkbox-component-required-possible/59999/3 "2023-04-02T10:08:42Z")

</div>

Hey Darren,

thanks for reaching out. I actually do have it as a custom form (process: new custom screen → add form container → add needed fields). the thing is, that the button at the end is getting added automatically but does not show up in left handed components list, hence no visibility conditions available. I’ve also tried adding button to a custom page and make that open a “new form” screen, but the buttons at the bottom also get added automatically without showing up in the components.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [April 2, 2023, 10:12am UTC](https://community.glideapps.com/t/make-switch-checkbox-component-required-possible/59999/4 "2023-04-02T10:12:03Z")

</div>

If you’re using a Form Container, then it’s not a Custom Form, and so that explains the behaviour.  
To get what you want, you would need to dispense with the Form Container.

---

<div class="post-metadata">

**Author:** ![dartiede](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dartiede/32/50216_2.png) [@dartiede](https://community.glideapps.com/u/dartiede)\
**Post date:** [April 2, 2023, 10:17am UTC](https://community.glideapps.com/t/make-switch-checkbox-component-required-possible/59999/5 "2023-04-02T10:17:13Z")

</div>

Ah okay. I’ve just put those fields outside the form container and deleted the container. But this also makes the fields invisible. Might it be because my app is set to public and no sign-in needed? Edit: tried different privacy and sign in settings, same outcome.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [April 2, 2023, 10:23am UTC](https://community.glideapps.com/t/make-switch-checkbox-component-required-possible/59999/6 "2023-04-02T10:23:01Z")

</div>

Do you understand how a custom form works, and how it is different from a native form?

Have a read of the below:

> [@Multi-step form](https://community.glideapps.com/t/multi-step-form/34556/4):
>
> A custom form is just a detail screen that’s designed to act like a form and uses entry components linked to user specific columns as the temporary placeholders for the data. Once you are done filling out the form, you can have a button with a custom action that will first have an Add Row action that will take those user specific column values and write them to a different table. You can then follow that action with a Set Column action that will clear the user specific columns so it’s ready fo…

> [@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:** ![dartiede](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dartiede/32/50216_2.png) [@dartiede](https://community.glideapps.com/u/dartiede)\
**Post date:** [April 2, 2023, 10:30am UTC](https://community.glideapps.com/t/make-switch-checkbox-component-required-possible/59999/7 "2023-04-02T10:30:09Z")

</div>

Hey thanks for the links. Found the issue in those: The table i was relating to did not have an entry yet, that is why the fields were hidden. I did not know that. Made my day.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [April 3, 2023, 10:31am UTC](https://community.glideapps.com/t/make-switch-checkbox-component-required-possible/59999/8 "2023-04-03T10:31:00Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
