# Visibility condition in forms

**URL:** <https://community.glideapps.com/t/visibility-condition-in-forms/12847>\
**Category:** Ask for Help\
**Created:** [July 20, 2020, 8:04pm UTC](https://community.glideapps.com/t/visibility-condition-in-forms/12847 "2020-07-20T20:04:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matteo\_Sangalli](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/matteo_sangalli/32/10939_2.png) [@Matteo\_Sangalli](https://community.glideapps.com/u/Matteo_Sangalli)\
**Post date:** [July 20, 2020, 8:04pm UTC](https://community.glideapps.com/t/visibility-condition-in-forms/12847/1 "2020-07-20T20:04:21Z")

</div>

Hello everyone, I’m having some difficulties with visibility condition in forms. My spreadsheet has one column for the type of product I want to sell and another column for its producer. In Glide’s app I have a form where the user can order a product (chosing from a list in another sheet) and I want it to show a specific text when the user select the product from the list, but I want it based on the producer.  
Let’s say I sell an apple and a banana (produced by “Fruits”) and a aubergine (produced by “Vegetables”). When the user selects the apple or the banana, I want the text “This product is produced by Fruits” to appear and when the user selects the aubergine I want the text “This product is produced by Vegetables” to appear.

How can I use visibility conditions to make this happen? Thank you for your help and sorry for my bad english!

---

<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:** [July 20, 2020, 10:11pm UTC](https://community.glideapps.com/t/visibility-condition-in-forms/12847/2 "2020-07-20T22:11:24Z")

</div>

Form is a bit of a sandbox, records won’t be able to be worked with using relations - lookups until they are submitted, so your best bet is to either do it outside of a form, then capture the information later inside a form using columns, or go the long way of adding every producer possible and set visibility to show based on the choice in the form, but that is not scalable.

---

<div class="post-metadata">

**Author:** ![Matteo\_Sangalli](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/matteo_sangalli/32/10939_2.png) [@Matteo\_Sangalli](https://community.glideapps.com/u/Matteo_Sangalli)\
**Post date:** [July 21, 2020, 10:53am UTC](https://community.glideapps.com/t/visibility-condition-in-forms/12847/3 "2020-07-21T10:53:54Z")

</div>

Thank you for your answer! I came up with the solution by creating a new column on my Google Sheet that automatically match the product name with the producer (using the CONCATENATE() function) such as “Apple - Fruits”. Then in the form I selected the choice between the new values but selecting the column of products in the option “Display as”. Then I added the visibility condition using “Contains” and it shows the text if the “products - producer” value contains the name of the producer.

I have another question: in the details of products I added the option to open the form, but I want it to set the initial value of the choice as the product which details were shown, Is there the possibility to do this?

---

<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:** [July 21, 2020, 11:02am UTC](https://community.glideapps.com/t/visibility-condition-in-forms/12847/4 "2020-07-21T11:02:19Z")

</div>

There’s no way to pre-populate it, but why do you want to change the product if the user has already gone into the details page of it? I would rather catch the product name via Columns component and let the user add other needed details only. Does it make sense for your case?

---

<div class="post-metadata">

**Author:** ![Matteo\_Sangalli](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/matteo_sangalli/32/10939_2.png) [@Matteo\_Sangalli](https://community.glideapps.com/u/Matteo_Sangalli)\
**Post date:** [July 21, 2020, 11:05am UTC](https://community.glideapps.com/t/visibility-condition-in-forms/12847/5 "2020-07-21T11:05:40Z")

</div>

Absolutely yes! How could I not have thought at it? Thank you again!
