Skip to main content
All CollectionsTemplates & Listing Strategies
Introduction to Hidden Fields: Customizing Builder Template Inputs
Introduction to Hidden Fields: Customizing Builder Template Inputs

What are Hidden Fields and How to Use Them

Jonathan Conda avatar
Written by Jonathan Conda
Updated over 2 months ago

Overview

Hidden fields are an advanced feature within builder templates that allow you to conditionally show or hide fields based on the information a Lister fills out. This information can then be used in the listing’s title and description. Hidden fields allow you to ensure every listing is detailed and accurate while only showing information that is pertinent to the item in question.

Table Of Contents

Getting Started

We will be using a template for purses and a template for shoes created by Upright Labs as examples. If you would like them added to your account, please email us at support@uprightlabs.com.

Here is how the template appears during the building phase.

This is what we see when previewing the template.

In this template there are 18 fields on the building phase and 11 fields when previewing it.

Visible vs Hidden Fields

Visible fields are fields or inputs that will always show.

The hidden fields are indicated by an orange eyeball and only show when certain answers or inputs are selected or not selected.

The list of inputs on the right includes all variable names used in the template.

Every field has a variable name. To see the variable name hover over the field and click on the gear icon. Variable names will, by default, be the same as the Label name, but can be changed to your preference.

This article will cover how to set up the hidden field in your inputs and two common scenarios. The first is a scenario where you want to show a hidden field if any selection is made on a visible field. The second is a scenario where you want to show a hidden field if a specific selection is made on a visible field.

You can also utilize hidden fields to conditionally show or hide information in your title and description. This article walks through how to do that.


Syntax Key

Hidden fields are formatted using Javascript. As such, it’s important to understand a few important symbols and what they mean in plain English.

  • == Equals

  • != Does Not Equal

  • “” Blank

Scenario 1: Any Selection Made

The most common use for hidden fields is to conditionally show one (or many) input(s) when any selection is made or when a field is not blank.

In the example below, if the Lister indicates that measurements are needed for this item, the fields for measurements will pop up.

To set up a hidden field that will only show if a selection is made the formula to use is as follows:

  • #{{VariableName == “”}}

  • In plain english, this formula is saying the following: "If VariableName is blank, hide this field” In other words, “if any input is made, show this field”

To apply this formula in the example purse template above, we would substitute the following information in the standard formula:

  • VariableName is measure → this is the variable for the visible field "Providing Measurements?"

  • The formula then is #{{measure == “”)

  • This formula states “If measurements checkbox is blank, hide this field.” The inverse then is also true - “if the measurements checkbox is checked off, show this field.”

Scenario 2: A Specific Selection Is Made

Another common use of hidden fields is to show a field if a specific answer is selected. Another way to think of this is: “If answer X is selected then show field Y.”

In the example below, if the selection for “Shoe Type” is “Boots”, then a text field will appear, allowing the lister to specify the type of boot.

In this example, the variable name for “Shoe Type” is “type.”

The hidden field shows only when the “Boots” option is selected.

To set up a hidden field that will only show if a specific selection is made the formula to use is as follows:

  • #{{VariableName != “AnswerX”}}

  • In plain english, this formula is saying the following: “If VariableName does not equal “AnswerX”, hide this field” In other words, “If AnswerX is selected, show this field.”

To apply this formula in the example purse template above, we would substitute the following information in the standard formula:

  • VariableName is type → this is the variable for the visible field, shoe type

  • AnswerX is Boots → this is the answer you want to trigger the appearance of your hidden field for boots type

  • The formula then is #{{type != “Boots”)

  • This formula states “If shoe type does not equal “Boots”, hide this field” which will show the field if “Boots” is selected from the shoe type input.

Check Your Work

Once you have added your hidden fields, it’s important to check that it works as you expect it to. To test it out, take the following steps:

  1. Press the Preview Button

  2. Check that all of the fields that had the hidden field icon have disappeared

  3. Make the selection on your visible field that should make a hidden field show

  4. If the hidden field pops up, you’ve got it right! If not, refer to the steps above or reach out to us if you need additional assistance

Next Steps: Updating The Title & Description

Check out this article for information on how to utilize this information in the listing title and description!

Related Guides

Have questions? Reach out to us at support@uprightlabs.com or via chat anytime between 9am-6pm ET, Monday to Friday

Did this answer your question?