# Custom action when edit screen (form) is cancelled (ON CANCEL)

**URL:** <https://community.glideapps.com/t/custom-action-when-edit-screen-form-is-cancelled-on-cancel/35383>\
**Category:** Feature Requests\
**Created:** [December 2, 2021, 8:23am UTC](https://community.glideapps.com/t/custom-action-when-edit-screen-form-is-cancelled-on-cancel/35383 "2021-12-02T08:23:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rayo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rayo/32/91372_2.png) [@rayo](https://community.glideapps.com/u/rayo)\
**Post date:** [December 2, 2021, 8:23am UTC](https://community.glideapps.com/t/custom-action-when-edit-screen-form-is-cancelled-on-cancel/35383/1 "2021-12-02T08:23:38Z")

</div>

currently we can add a custom action ON SUBMIT of Edit Form.

would be great if we could also add a custom action ON CANCEL of the form.

can be very useful to restore default conditions if form was triggered from a button with other set columns changes made.  
ex. in my apps, edit screens are sometimes triggered from buttons with visibility Boolean conditions to view certain edit parts depending on where or who is accessing the edit screen from.  
(A store can edit an item details. A driver can edit the shipping details of that item) etc…

it can also be useful to track time spent on a form by a user.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [December 2, 2021, 9:02am UTC](https://community.glideapps.com/t/custom-action-when-edit-screen-form-is-cancelled-on-cancel/35383/2 "2021-12-02T09:02:20Z")

</div>

that’s why its better to always create your own form… so you have a full control

---

<div class="post-metadata">

**Author:** ![rayo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rayo/32/91372_2.png) [@rayo](https://community.glideapps.com/u/rayo)\
**Post date:** [December 2, 2021, 10:56am UTC](https://community.glideapps.com/t/custom-action-when-edit-screen-form-is-cancelled-on-cancel/35383/3 "2021-12-02T10:56:48Z")

</div>

how do you usually create your own forms? the new screen action doesn’t really create a form feeling, no cancel / submit … etc.

---

<div class="post-metadata">

**Author:** ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)\
**Post date:** [December 2, 2021, 11:10am UTC](https://community.glideapps.com/t/custom-action-when-edit-screen-form-is-cancelled-on-cancel/35383/4 "2021-12-02T11:10:53Z")

</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:** ![escott](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/escott/32/46156_2.png) [@escott](https://community.glideapps.com/u/escott)\
**Post date:** [August 28, 2022, 10:18pm UTC](https://community.glideapps.com/t/custom-action-when-edit-screen-form-is-cancelled-on-cancel/35383/5 "2022-08-28T22:18:50Z")

</div>

Just to clarify, because I’m just getting started with Glide: when viewing a list of items on a form, I can choose the action “Show Edit Screen” to edit the selected item. But your advice is never to use that option, but rather to create a form and jump over to that, is that right?

I have a different problem but it might have the same solution. 🤓 Thanks.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [August 28, 2022, 11:11pm UTC](https://community.glideapps.com/t/custom-action-when-edit-screen-form-is-cancelled-on-cancel/35383/6 "2022-08-28T23:11:00Z")

</div>

to be clear, I use the words “is better” not “never” 😉  
the idea of creating custom forms or editing screens applies to situations when you need all App functionalities when entering or editing data… for instance: if you need to compute entered data before saving, to check or show some restrictions… also you can use relations to entered data, and my favorite… you can apply CSS codes.  
to create a custom form or edit screen, have an action in button, image, or list that will open a new screen… now you add all the entry elements that you need, for each entry, create a USC column to collect that data…  
when the user is done editing/entering simply create the compound action to add a new row (for form), or set columns (for editing) then, clear USC columns (optional if you don’t want users to have their data there when they come back again), show notification, and go back…

---

<div class="post-metadata">

**Author:** ![escott](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/escott/32/46156_2.png) [@escott](https://community.glideapps.com/u/escott)\
**Post date:** [August 29, 2022, 12:21am UTC](https://community.glideapps.com/t/custom-action-when-edit-screen-form-is-cancelled-on-cancel/35383/7 "2022-08-29T00:21:13Z")

</div>

Got it. Thanks! That’s useful. 👍🏻
