# Erase a form after submitting it

**URL:** <https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303>\
**Category:** Ask for Help\
**Created:** [January 17, 2022, 2:18pm UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303 "2022-01-17T14:18:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonyko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jonyko/32/37574_2.png) [@jonyko](https://community.glideapps.com/u/jonyko)\
**Post date:** [January 17, 2022, 2:18pm UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/1 "2022-01-17T14:18:00Z")

</div>

I have a form in my app Buk, where people fills text entries, and then press a button to add a line in the sheet. I’d like to erase the text entry fields in the app after they are added to the sheet.

How can i do that?

Thanks,

Jonatan

---

<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:** [January 17, 2022, 2:48pm UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/2 "2022-01-17T14:48:36Z")

</div>

You can create a custom action that first adds the row and then clears the column values afterwards.

Also, just checking, but are you aware of Glide’s native form function that would prevent you having to clear the column values?

---

<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:** [January 17, 2022, 11:41pm UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/3 "2022-01-17T23:41:05Z")

</div>

Adding to what Jeff said, I believe you’re using a “custom form” where you have entry components on the screen and finish it by an “add row” action?

You can either use the action “Show form” and build your entries there, or use a set column action within your current flow to add a new row, clearing all entry columns after adding a new row.

---

<div class="post-metadata">

**Author:** ![jonyko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jonyko/32/37574_2.png) [@jonyko](https://community.glideapps.com/u/jonyko)\
**Post date:** [January 18, 2022, 6:18pm UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/4 "2022-01-18T18:18:38Z")

</div>

Can i make a tab a form? because i only found the form button, but that would add another step (touch to get in the tab, and then touch the button to open the form)

With the other way, with a custom action, what is the action i should use to clear the text entries and notes fields in the app (but keeping the data in the row added)??

Thank you very much!

---

<div class="post-metadata">

**Author:** ![jonyko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jonyko/32/37574_2.png) [@jonyko](https://community.glideapps.com/u/jonyko)\
**Post date:** [January 18, 2022, 6:21pm UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/5 "2022-01-18T18:21:02Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/4/34f5c5a5e1a19f177c13436d639f4d0aa8a34dd7.png)

That is the tab with the form. 2 Text entry fields and 1 notes fields. Then the button that should add the row and then clear the text used as input.

Thank you all!

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [January 18, 2022, 6:46pm UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/6 "2022-01-18T18:46:07Z")

</div>

Use a custom action in the button.

1. Add row to destination sheet
2. Set column \> clear values of the current sheet

---

<div class="post-metadata">

**Author:** ![jonyko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jonyko/32/37574_2.png) [@jonyko](https://community.glideapps.com/u/jonyko)\
**Post date:** [January 18, 2022, 7:46pm UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/7 "2022-01-18T19:46:12Z")

</div>

i didn’t find “clear values of the current sheet”.

That won’t erase the row that i’ve just added with the form?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [January 18, 2022, 8:53pm UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/8 "2022-01-18T20:53:14Z")

</div>

It’s Set Columns \> this row \> (whatever columns you want to clear) \> Clear value

---

<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:** [January 19, 2022, 12:23am UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/9 "2022-01-19T00:23:52Z")

</div>

Also, make sure all those entries are written into user-specific columns so users won’t overwrite each other.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [January 19, 2022, 1:03am UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/10 "2022-01-19T01:03:19Z")

</div>

Ya … I thought to mention this…didn’t want to overwhelm :?

---

<div class="post-metadata">

**Author:** ![John\_Wilson](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_wilson/32/37710_2.png) [@John\_Wilson](https://community.glideapps.com/u/John_Wilson)\
**Post date:** [January 19, 2022, 5:34pm UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/11 "2022-01-19T17:34:39Z")

</div>

I also did all of that, but still doesn’t work… Can anyone help me in this? Maybe here are some software developers in this [site here](https://www.worktime.com/)?

---

<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:** [January 19, 2022, 7:17pm UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/12 "2022-01-19T19:17:45Z")

</div>

Some great suggestions above. Just in case it helps, I’m happy to share my tip for working with forms.

1. Always create a Glide Table called FORM in your app
2. The FORM table should have 1 row only. The first column should be a simple TEXT column. Call it something random like Index and insert 1 as in the value in the first cell
3. All other columns will have values that will be useful to your forms and be specific to each user. Hence, if your form has 3 fields, e.g. Comment A, Comment B, Comment C then create 3 Text columns and make sure each one is User Specific
4. To add a form feature in your App, add a button and edit the button & design, here we see screen with a button that will add a new theme:

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/a/fa13daa0a689bc6b5704ef6b074fc84519dbf04f.png)

1. Change the action that is triggered by the button. It’s good practice to create a custom action like this one. Notice how the new action is Show New Screen with the data coming from the FORM table.

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/c/3c79b560d49e9f6784305be30eb13ad5dabd79b0.png)

1. If you click on the button it will open the new screen ready for editing. Now you can switch to ‘Details’ style and add some form input components.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/1/41eac3a3241ee40350b9f7fc23ade31be711fe36.png)

2. The secret here is that all users edit the first row of the FORM table. But since the important cells are all user specific nothing gets muddled. In the example below I have added a Text input component and then a button bar.

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/f/cf68f8fac1200ff0b0064a4a7d7e1eae75fffee2.png)

1. The text input writes to a field in the FORM sheet. I play with the visibility of the button bar (actually I have some duplicates with different conditions) so that when the input field is acceptable the buttons are visible/active. Clicking Back has the Go Back action.

2. Clicking Submit has a Custom Action, which will add a row to your data table. In the my example, there are 3 steps: Add a row; Show a notification; Clear the form

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/d/dd6d81ca879a191b0787f6a7aea1e078223a1181.png)

You can see the detail for the Add Row step below. Notice how it adds a row to a Themes sheet then sets some columns, e.g. the Text field from the previous screen and then I automatically force in a category descriptor (S) into the category cell. You could automatically add other data like Date/time, user email, etc…

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/1/f18bbaa531fbd84b01b5f4e2592ed823e53d04e3.png)

I find this a safe way to work with forms. Good luck!

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [January 19, 2022, 7:20pm UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/13 "2022-01-19T19:20:44Z")

</div>

I’m crafting a video and demo app now for you.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [January 19, 2022, 7:40pm UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/14 "2022-01-19T19:40:18Z")

</div>

> **[Custom Form Concept · Glide - 19 January 2022](https://www.loom.com/share/84b42ebe62014ae291fbe28c1d850717)**

Create a copy here: [https://formtypes.glideapp.io/](https://formtypes.glideapp.io/)

---

<div class="post-metadata">

**Author:** ![jonyko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jonyko/32/37574_2.png) [@jonyko](https://community.glideapps.com/u/jonyko)\
**Post date:** [January 20, 2022, 12:59am UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/15 "2022-01-20T00:59:11Z")

</div>

Thank you @Robert_Petitto ! I’ve tried your solution but i cant make the columns user specific

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/e/fe47d04e0edb2b4ef598596b1d50f9f08a6b84c2.png)

Why is that?

---

<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:** [January 20, 2022, 1:05am UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/16 "2022-01-20T01:05:39Z")

</div>

That seems to be a column that already exists in Google Sheets/Glide Tables. You can only specify new columns as user-specific.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [January 20, 2022, 1:21am UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/17 "2022-01-20T01:21:37Z")

</div>

Right. @jonyko Just PMed you…

---

<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:** [January 20, 2022, 1:29am UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/18 "2022-01-20T01:29:37Z")

</div>

> [@Simon\_Hill](#):
>
> The FORM table should have 1 row only. The first column should be a simple TEXT column. Call it something random like Index and insert 1 as in the value in the first cell

If you add a RowID column, this step isn’t necessary. Glide will create the first row for you.

---

<div class="post-metadata">

**Author:** ![mn2000](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@mn2000](https://community.glideapps.com/u/mn2000)\
**Post date:** [June 19, 2022, 6:37pm UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/19 "2022-06-19T18:37:55Z")

</div>

Hey Robert! I made this loom explaining my question. Let me know what you think! Thank you so much  
[loom video](https://www.loom.com/share/6e7f2376c53441e2953b210a82bc09a6)

---

<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:** [June 19, 2022, 9:34pm UTC](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303/20 "2022-06-19T21:34:51Z")

</div>

What you have there is a bit unconventional, and I’m afraid it could cause you issues down the road…especially if you plan to edit those entries once they’ve been added, which could very likely use the same edit form that you are already using.

The main issue is that you are using an Edit form, which happens to be set to edit the first row in the table. You are actually filling that first existing row, then moving all of those values to a new row, and then clearing it out. A much much easier method would be to simply use a normal Add form if your screen was configured as a list style view. However, you are currently using a Details style view which is fine and offers some benefits. Just keep in mind that a screen with a details style layout is always connected to an existing row, unless you set some crazy filters or don’t actually have any rows of data…but normally it’s connected to the first row that’s in a table or the first row that matches a filter, unless you get to that detail screen from a higher level list. If you want to stick with a details style view, then I would recommend using a form button instead and turn off the edit button. I don’t see reason why you need to reserve a blank row just for adding new rows when there is already a native Add form or Form button which will function the same and be much easier to manage without the need for additional On Submit actions or a reserved empty row.

Also, with the way you are trying to trick the Edit form to function as an Add form, you will have problems when you later want to edit your existing entries and it starts using that same edit form. You may end up inadvertently duplicating an entry and clear the existing entry which will just create a bunch of blank rows in the end. It will just make a mess of your table. An Edit form should be reserved for editing existing rows of data. Not for creating new rows of data, unless you have some sort of special use case, which I don’t see here.

I will still address some of your questions though.

- Regarding sorting, when you select the inline list, there will be an Options tab on the right side of the builder. In there is where you can set your sorting to sort by date.
- The reason for the glitching in the list is because you are populating that first row, then clearing it and adding a new row. You see this all happening in the list.
- If you change your flow to stop using the Edit form to function as an Add form, then you won’t have to worry about blank entries in your list, but in that same spot where you can change your sorting for you inline list, you also have the option to set a filter, so you could filter out rows that you don’t want to see, but again, if done correctly, you shouldn’t have empty rows.

[Next page](https://community.glideapps.com/t/erase-a-form-after-submitting-it/37303.md?page=2)
