# Default value in forms

**URL:** <https://community.glideapps.com/t/default-value-in-forms/5606>\
**Category:** Feature Requests\
**Created:** [March 20, 2020, 6:34am UTC](https://community.glideapps.com/t/default-value-in-forms/5606 "2020-03-20T06:34:11Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manan\_Mehta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manan_mehta/32/13957_2.png) [@Manan\_Mehta](https://community.glideapps.com/u/Manan_Mehta)\
**Post date:** [March 20, 2020, 6:34am UTC](https://community.glideapps.com/t/default-value-in-forms/5606/1 "2020-03-20T06:34:11Z")

</div>

Most of the times when adding a new entry, some of the fields are having the same value more than 80% of the time.  
Could we have a predefined default value when a new form is created which could be changed if the user wants to.  
This will make the app much more user-friendly.

The default value could be an option like the placeholder text in features.

---

<div class="post-metadata">

**Author:** ![sardamit](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sardamit/32/263_2.png) [@sardamit](https://community.glideapps.com/u/sardamit)\
**Post date:** [March 20, 2020, 10:40am UTC](https://community.glideapps.com/t/default-value-in-forms/5606/2 "2020-03-20T10:40:16Z")

</div>

This would help immensely.  
I am thinking of having this as a field in the layout view.  
Could be a small challenge to typecast the field to the datatype of the field.

---

<div class="post-metadata">

**Author:** ![Tim\_Sullivan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tim_sullivan/32/3461_2.png) [@Tim\_Sullivan](https://community.glideapps.com/u/Tim_Sullivan)\
**Post date:** [March 20, 2020, 11:02am UTC](https://community.glideapps.com/t/default-value-in-forms/5606/3 "2020-03-20T11:02:39Z")

</div>

Great idea. I suggest you add them to the feature request app.

> **[Feature Requests](https://features.staging.glideapp.io/)**
>
> Feature requests for Glide Apps

---

<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:** [March 20, 2020, 11:39am UTC](https://community.glideapps.com/t/default-value-in-forms/5606/4 "2020-03-20T11:39:51Z")

</div>

Good idea with the placeholder. A checkbox could be added to make it the default value?

---

<div class="post-metadata">

**Author:** ![Manan\_Mehta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manan_mehta/32/13957_2.png) [@Manan\_Mehta](https://community.glideapps.com/u/Manan_Mehta)\
**Post date:** [March 20, 2020, 12:21pm UTC](https://community.glideapps.com/t/default-value-in-forms/5606/5 "2020-03-20T12:21:55Z")

</div>

Yes that sounds perfect @Robert_Petitto

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [August 10, 2021, 4:58am UTC](https://community.glideapps.com/t/default-value-in-forms/5606/6 "2021-08-10T04:58:17Z")

</div>

I think the default value is an indispensable feature nowadays; in my opinion there are much more advanced features than this already available in Glide but this one is so basic that, I believe, we can’t do without it anymore.  
My clients ask me: “Why do I see the correct value in the field and always force me to rewrite it again?”  
… and I never know what to answer! 😑

---

<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:** [August 10, 2021, 5:05am UTC](https://community.glideapps.com/t/default-value-in-forms/5606/7 "2021-08-10T05:05:03Z")

</div>

You can already do this with a custom form, just saying…

---

<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 10, 2021, 5:12am UTC](https://community.glideapps.com/t/default-value-in-forms/5606/8 "2021-08-10T05:12:56Z")

</div>

But we do have default values in form entry components. Or am I misunderstanding what you are asking for?

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

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [August 10, 2021, 5:29am UTC](https://community.glideapps.com/t/default-value-in-forms/5606/9 "2021-08-10T05:29:16Z")

</div>

@Darren_Murphy , @Jeff_Hager thanks for your attention.

## I have not expressed myself correctly or I am missing something extremely obvious. I will explain better with an example. Let’s say I have a custom form to insert an invoice row. I will then have a choice component to select the item I am selling in that row; the following input fields are the quantity and the selling price. The quantity is a variable datum and therefore must normally always be entered, while the selling price is a datum susceptible to variations.

How do I make the standard sale price appear pre-compiled in the input field?  
Currently the only thing I can do is make the item’s selling price appear in the placeholder of the selling price input field.

If you tell me that I can do better you make me happy!  
Thanks!

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [August 10, 2021, 5:29am UTC](https://community.glideapps.com/t/default-value-in-forms/5606/10 "2021-08-10T05:29:58Z")

</div>

sorry for the bold text, it’s unintentional

---

<div class="post-metadata">

**Author:** ![Manan\_Mehta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manan_mehta/32/13957_2.png) [@Manan\_Mehta](https://community.glideapps.com/u/Manan_Mehta)\
**Post date:** [August 10, 2021, 5:33am UTC](https://community.glideapps.com/t/default-value-in-forms/5606/11 "2021-08-10T05:33:51Z")

</div>

You mean to say that the price value is dependent on the product which they choose in the choice component? Basically you want a lookup as a default value right?

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [August 10, 2021, 5:38am UTC](https://community.glideapps.com/t/default-value-in-forms/5606/12 "2021-08-10T05:38:02Z")

</div>

Right. I’ve the lookup on the fly and I want to put that value in the input field, just like i am doing now with placeholder but I need a default value instead.

---

<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:** [August 10, 2021, 5:38am UTC](https://community.glideapps.com/t/default-value-in-forms/5606/13 "2021-08-10T05:38:44Z")

</div>

Seems quite simple - again if using a custom form with the input components writing to User Specific Columns.

- Create a relation between the selected product and the products list
- Use a lookup through that relation to get the product price
- Use a math column to calculate the total price based on the quantity selected
- Display the result of the math column in the form, and use it when the form is submitted with an Add Row action

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [August 10, 2021, 5:43am UTC](https://community.glideapps.com/t/default-value-in-forms/5606/14 "2021-08-10T05:43:12Z")

</div>

I do 99% what you say, but I don’t need to calculate the price, I need to show the pre-filled typical price in the input field so that the user can confirm it or change it only when necessary.

---

<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 10, 2021, 5:48am UTC](https://community.glideapps.com/t/default-value-in-forms/5606/15 "2021-08-10T05:48:40Z")

</div>

How about an IF column that returns the user entered price…if not empty…else return the default price.  
Display that IF column price on the screen, but if the user enters a price in an entry component, then the IF will kick in and instead display what the user entered. The IF value is what will be submitted through the form.

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [August 10, 2021, 5:51am UTC](https://community.glideapps.com/t/default-value-in-forms/5606/16 "2021-08-10T05:51:03Z")

</div>

Yes indeed I have done so recently, but it is not the most elegant solution, in my opinion of course.

---

<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:** [August 10, 2021, 5:51am UTC](https://community.glideapps.com/t/default-value-in-forms/5606/17 "2021-08-10T05:51:05Z")

</div>

> [@Roldy](#):
>
> I do 99% what you say, but I don’t need to calculate the price, I need to show the pre-filled typical price in the input field so that the user can confirm it or change it only when necessary.

Haven’t tested this, but I imagine you could:

- Use the value of the product lookup as the default for the input component
- But have the target of the same component a User Specific column

Then use an if-then-else column to determine which value to use when Adding a row:

- If the User Specific column is empty (user has not overwritten the default), then use the lookup value
- Else use the User Specific column value

---

<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:** [August 10, 2021, 5:51am UTC](https://community.glideapps.com/t/default-value-in-forms/5606/18 "2021-08-10T05:51:52Z")

</div>

haha, snap! 🤣

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [August 10, 2021, 5:52am UTC](https://community.glideapps.com/t/default-value-in-forms/5606/19 "2021-08-10T05:52:55Z")

</div>

Yes, pretty much the same as @Jeff_Hager said.

That’s right, I am currently coming to the conclusion that it is not possible to do better than this.  
Thank you all for your cooperation!

---

<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 10, 2021, 6:01am UTC](https://community.glideapps.com/t/default-value-in-forms/5606/20 "2021-08-10T06:01:31Z")

</div>

We share a brain.

[Next page](https://community.glideapps.com/t/default-value-in-forms/5606.md?page=2)
