# How do I create a custom form?

**URL:** https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014
**Category:** Community Resources
**Created:** [April 1, 2021, 11:46am UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014 "2021-04-01T11:46:14Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![Mns\_Glide](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mns_glide/32/2514_2.png) [@Mns\_Glide](https://community.glideapps.com/u/Mns_Glide)
#### Post date: [August 15, 2021, 8:42am UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/22 "2021-08-15T08:42:53Z")

</div>

understand. thanks

---

<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: [August 15, 2021, 2:04pm UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/23 "2021-08-15T14:04:27Z")

</div>

What are you trying to do with the user data? Are you trying to display it on the screen or pass it through the custom form when you submit the form? What you are showing with the user columns in the native form is to pass the user profile data into the form sheet. In a custom form, that same information would still be there, but in an action, such as Add Row. If I understand correctly, you should still be able to do what you want, but you just need to look in a different place to get that user data written to the form sheet.

---

<div class="post-metadata">

### Author: ![Mns\_Glide](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mns_glide/32/2514_2.png) [@Mns\_Glide](https://community.glideapps.com/u/Mns_Glide)
#### Post date: [August 15, 2021, 2:09pm UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/24 "2021-08-15T14:09:47Z")

</div>

Thanks @Jeff_Hager . I think I understand what you mean in the add row. Will try it.

---

<div class="post-metadata">

### Author: ![ALEKSEI\_BARANOV](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aleksei_baranov/32/33948_2.png) [@ALEKSEI\_BARANOV](https://community.glideapps.com/u/ALEKSEI_BARANOV)
#### Post date: [September 23, 2021, 12:15pm UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/25 "2021-09-23T12:15:14Z")

</div>

Great, Darren! Thank you.

---

<div class="post-metadata">

### Author: ![Daniel\_Canup](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daniel_canup/32/32850_2.png) [@Daniel\_Canup](https://community.glideapps.com/u/Daniel_Canup)
#### Post date: [November 10, 2021, 10:13pm UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/26 "2021-11-10T22:13:32Z")

</div>

So I am using conditions, in the action editor, and checking for user-specific fields that are written into from a selector. However, is does not hide my button bar or disable the button if the fields are empty. Please help.

---

<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: [November 10, 2021, 11:44pm UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/27 "2021-11-10T23:44:35Z")

</div>

Can you show us some screenshots? Do you mean that if fields are empty in an Add Row action then your button should be hidden (as you said you’re checking in the action editor).

I believe there are 2 cases when a button will be hidden:

- It does not satisfy your visibility conditions.
- You use branches of conditions for your action and the relevant data satisfies none of those.

---

<div class="post-metadata">

### Author: ![Daniel\_Canup](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daniel_canup/32/32850_2.png) [@Daniel\_Canup](https://community.glideapps.com/u/Daniel_Canup)
#### Post date: [November 11, 2021, 1:18am UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/28 "2021-11-11T01:18:19Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/7/57fbcf4a86b05c957c257cad08db1fb966442d88.png)

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/6/8624b0d9d456469f9e0c2c6b3cb0f110a753a2d0.png)

---

<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: [November 11, 2021, 1:22am UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/29 "2021-11-11T01:22:10Z")

</div>

Which button do you expect to not be visible here? You’re using a button bar, and your screenshot shows that you have multiple branches of condition, if one of them is satisfied then your button will still be clickable.

---

<div class="post-metadata">

### Author: ![Daniel\_Canup](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daniel_canup/32/32850_2.png) [@Daniel\_Canup](https://community.glideapps.com/u/Daniel_Canup)
#### Post date: [November 11, 2021, 1:23am UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/30 "2021-11-11T01:23:04Z")

</div>

So I thought that the next button would be disabled if the condition wasn’t met.

---

<div class="post-metadata">

### Author: ![Daniel\_Canup](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daniel_canup/32/32850_2.png) [@Daniel\_Canup](https://community.glideapps.com/u/Daniel_Canup)
#### Post date: [November 11, 2021, 1:23am UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/31 "2021-11-11T01:23:33Z")

</div>

I am using an AND in my condition though.

---

<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: [November 11, 2021, 1:24am UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/32 "2021-11-11T01:24:26Z")

</div>

But you also have a branch on the left of that, right? I assume that one is satisfied?

---

<div class="post-metadata">

### Author: ![Daniel\_Canup](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daniel_canup/32/32850_2.png) [@Daniel\_Canup](https://community.glideapps.com/u/Daniel_Canup)
#### Post date: [November 11, 2021, 1:24am UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/33 "2021-11-11T01:24:59Z")

</div>

That one button is, yes.

---

<div class="post-metadata">

### Author: ![Daniel\_Canup](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daniel_canup/32/32850_2.png) [@Daniel\_Canup](https://community.glideapps.com/u/Daniel_Canup)
#### Post date: [November 11, 2021, 1:26am UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/34 "2021-11-11T01:26:10Z")

</div>

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

This behavior is what I thought I would achieve on the one-button not satisfied.

---

<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: [November 11, 2021, 1:28am UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/35 "2021-11-11T01:28:55Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/7/57fbcf4a86b05c957c257cad08db1fb966442d88.png)

I mean here, you have a branch on the left of this and it’s likely that the data satisfy that one. All branches must not be satisfied in order for the button to be disabled.

---

<div class="post-metadata">

### Author: ![Daniel\_Canup](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daniel_canup/32/32850_2.png) [@Daniel\_Canup](https://community.glideapps.com/u/Daniel_Canup)
#### Post date: [November 11, 2021, 1:30am UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/36 "2021-11-11T01:30:51Z")

</div>

Oh I see what you meant by left branch now. Hmm…

---

<div class="post-metadata">

### Author: ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)
#### Post date: [December 9, 2021, 8:02pm UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/37 "2021-12-09T20:02:34Z")

</div>

Here is a version where I use trim whitespace and lowercase text to build the relation that checks for duplicates. Also using trim on submit in the add row action…

> **[Custom Form w/ Trim and Lower](https://slick-chess-1109.glideapp.io/)**

---

<div class="post-metadata">

### Author: ![Test\_Test](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/test_test/32/30930_2.png) [@Test\_Test](https://community.glideapps.com/u/Test_Test)
#### Post date: [December 21, 2021, 4:21pm UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/38 "2021-12-21T16:21:52Z")

</div>

Hi @Darren_Murphy  
I’ve already mentioned this post on several other posts with appreciation but I’d like to extend another “thank you” also here.  
On the topic of duplicates, I’d like to ask a couple of questions:

1. As it seems, the custom form is NOT creating a new line when form is opened. Instead, the form is “riding” on the top line of whichever table we’re in. Is that correct?
2. Assuming the above is correct, and all input/form columns are USC, it seems that indeed we’re safe from duplicates. However, one challenge with this “top line” usage. What happens if one of the columns is a counter and as part of the “save” button actions we increment it by 1? Won’t this potentially allow same counter for several concurrent form submissions? Any other problems this may create?  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/3/1314e7aa658db354087454a31f179b2ec7aeb1dd.png)
3. Even if duplicates aren’t possible as per point 2 above, I have another “stupid” issue that I cannot figure out. I’m sure it’s SUPER simple.  
it seems we’ll always have the same counter twice. Once for the last entry (created at the bottom of the table) and once in the first row. I also tried to use a math column with “+1” but that didn’t seem to solve anything. Any ideas for a counter inside custom forms?
4. SUPER simple again: These clients numbers should be, ideally, consecutive no matter which user entered the last entry via the custom form. Won’t that create different set of numbers for each user?

Thanks again!

---

<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: [December 21, 2021, 4:34pm UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/39 "2021-12-21T16:34:14Z")

</div>

> [@Test\_Test](#):
>
> As it seems, the custom form is NOT creating a new line when form is opened. Instead, the form is “riding” on the top line of whichever table we’re in. Is that correct?

That’s generally the case, but it depends how you got there. For example, if you were in the details screen of a record 20 or 30 rows deep, then did a Show New Screen → This Item from there, then that’s the row where your User Specific Column values will go. What I’ll often do is open my custom form on top of a completely separate table - a table that has just a single row. Then collect all my form data in that row, before writing a new row to the destination table when the user submits. This keeps things nice and clean.

> [@Test\_Test](#):
>
> Assuming the above is correct, and all input/form columns are USC, it seems that indeed we’re safe from duplicates. However, one challenge with this “top line” usage. What happens if one of the columns is a counter and as part of the “save” button actions we increment it by 1? Won’t this potentially allow same counter for several concurrent form submissions? Any other problems this may create?

What’s the purpose of this counter? Sounds like it has nothing to do with the custom form?

> [@Test\_Test](#):
>
> Even if duplicates aren’t possible as per point 2 above, I have another “stupid” issue that I cannot figure out. I’m sure it’s SUPER simple.  
> it seems we’ll always have the same counter twice. Once for the last entry (created at the bottom of the table) and once in the first row. I also tried to use a math column with “+1” but that didn’t seem to solve anything. Any ideas for a counter inside custom forms?

Again, I think I need to understand better what you’re using this counter for…

> [@Test\_Test](#):
>
> SUPER simple again: These clients numbers should be, ideally, consecutive no matter which user entered the last entry via the custom form. Won’t that create different set of numbers for each user?

So you’re wanting some sort of unique incrementing number?  
A word of warning… down this path there be dragons 😉

Have a read through this thread… (all of it)

> [@Auto Numbering](https://community.glideapps.com/t/auto-numbering/20355):
>
> How to setting auto numbering that appear with a new order submit by a form button? Example, i have 3 form submitted. i need the first submitted form showing: 0001 - “form result; …” 0002 - “form result; …” 0003 - “form result; …” those 0001,0002,0003 auto generate by data backend.

---

<div class="post-metadata">

### Author: ![Test\_Test](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/test_test/32/30930_2.png) [@Test\_Test](https://community.glideapps.com/u/Test_Test)
#### Post date: [December 22, 2021, 7:19am UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/40 "2021-12-22T07:19:04Z")

</div>

Thanks!  
A very detailed answer, as always. You’re right, the counter is a sequential client number, added to each lead (even before they’re a client, if at all). This will naturally create a situation in which two clients won’t have sequential numbers, even if they have been created one after a another (if a lead was created in between it’ll take that consecutive number). What I’ve done in the past is use the [LockService](https://developers.google.com/apps-script/reference/lock) on Google Script. It seems to be exactly what it is meant for, but it’s not very fast and it can create lags if we have many submissions at once, all asking the locked part of the script to generate a number for a new lead. I was really hoping to replace this (hardcore?) lock with a more elegant solution from Glide.

I’ve read all of the posts in the topic you linked and it seems that indeed these dragons hunt many of us 🙂  
I very much liked your [video example](https://community.glideapps.com/t/unique-numbers/35039/8).  
However, I’m still puzzled by the [race condition](https://community.glideapps.com/t/action-sequencing-blocking-or-non-blocking/19601/2). Have you ever received feedback from Glide about this?  
Same question, different approach, have you ever found out a way to force an action to be on the server-side? Specifically, having the compound action of “incremate” happen on the server. This will, hopefully, complete remove any chance of a race condition, even if two forms are submitted at the exact same time.  
I very much liked your idea of having a separate table for the custom form, as well as the column that has the same value in all rows (next number), inside the data table. Again, this one-row custom form table isn’t immune to the race condition. Or is it?

---

<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: [December 22, 2021, 8:56am UTC](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014/41 "2021-12-22T08:56:41Z")

</div>

> [@Test\_Test](#):
>
> I very much liked your [video example](https://community.glideapps.com/t/unique-numbers/35039/8).

Thank you 🙂

> [@Test\_Test](#):
>
> However, I’m still puzzled by the [race condition](https://community.glideapps.com/t/action-sequencing-blocking-or-non-blocking/19601/2). Have you ever received feedback from Glide about this?

No, not really. But concurrency can definitely be a problem, and I’ve bumped into its effects several times.

> [@Test\_Test](#):
>
> Same question, different approach, have you ever found out a way to force an action to be on the server-side? Specifically, having the compound action of “incremate” happen on the server. This will, hopefully, complete remove any chance of a race condition, even if two forms are submitted at the exact same time.

My goto solution these days for dealing with race conditions/concurrency is to delegate to Integromat. By funnelling critical updates through Integromat I’m able to ensure that they are queued and handled serially, and avoid users tripping over each other or clobbering each other’s updates.

Below is some more reading on this topic, where I described an option for a specific use case:

> [@Row Numbers](https://community.glideapps.com/t/row-numbers/27619/11):
>
> I do believe that if you had just a single GSheet, then you could solve your problem. I’m not sure what your current user journey looks like, but it would need to be a two step process, with a short delay in between each step. Here is what I’m envisaging: When a user taps a button to claim a collectable, you put them into a “holding pattern” The button that they tap sends a webhook to Integromat with two values: the UserID, and the ID (RowID?) of the item they are attempting to claim. Integrom…

> [@Test\_Test](#):
>
> Again, this one-row custom form table isn’t immune to the race condition. Or is it?

No, it’s not. As far as I’m aware, the only way to ensure immunity is to delegate updates to a 3rd party.

[Previous page](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014.md?page=1)

[Next page](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014.md?page=3)
