All Collections
Templates & Listing Strategies
How to Use Hidden Fields in Your Template Title & Description
How to Use Hidden Fields in Your Template Title & Description

Advanced features to optimize your builder templates

Lori Clark avatar
Written by Lori Clark
Updated over a week ago

Overview

If you are new to hidden fields, start with this help article. If you’re ready to use hidden fields to generate your title and description, please continue reading!

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. Hidden field syntax can also be used to conditionally show or hide information in the title and description fields based on what the Lister has entered.


Table of Contents


Syntax & Terminology

  • Visible fields → fields or inputs that will always show

  • Hidden fields → fields that will be hidden unless certain criteria are met

  • == Equals

  • != Does Not Equal

  • “” Blank

  • Quotes “” are used for any string of words

  • Backticks ` are used to display paragraphs of words

In addition to the syntax above, our system will accept any syntax used in Javascript.

How to Customize Title & Description with Hidden Fields

There are a few common scenarios for using hidden fields in your title and description.

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 email us at support@uprightlabs.com.

Scenario 1: Inserting Hidden Field Response in a Title and/or Description

In some cases, you may want to add the answer to a hidden field directly to the title or description. Inserting this information into your title or description works the same way any visible field works. Simply put the variable name for your hidden field into curly brackets using the formatting below:

  • {{VariableName}}

In the example below, the title will include the type of Sneaker selected by the Lister in the title. In other words, if the lister selects Sneaker as the shoe type and then indicates that it is a pair of Basketball sneakers, the word “Basketball” will appear in the title in the space for {{sneakerType}}.

Scenario 2: If Else Statements

In some cases, you may want to include specific text if a certain criteria is met and different text or no text if that criteria is not met.

In the example below, we want the word Vintage to appear at the beginning of the title, if the lister selects the checkbox labeled “Is this a vintage purse?”

To set this up, use the following formula:

  • {{VariableName != "Criteria"? "Text_if_TRUE":"Text_if_FALSE"}}

  • VariableName is the variable name of the field that will control this statement

  • Criteria is the criteria that must be met in order for the statement to be considered TRUE

  • Text_if_TRUE is the text you want to show if the criteria is met

  • Text_if_FALSE is the text you want to show if the criteria is NOT met

  • If you want to insert variables for the Text_if_TRUE or Text_if_FALSE sections, simply remove the quotes!

To show the word “Vintage” if the lister checks off the checkbox labeled “Is this a vintage purse?”, use the following formula:

  • {{vintagepurse != ""? "Vintage":""}}

In plain english this formula reads: If the vintage checkbox is not blank, add the word “Vintage:", if not, leave it blank

  • VariableName = vintagepurse

  • Criteria = “” ← blank

  • Text_if_TRUE = “Vintage”

  • Text_if_FALSE = “” ← blank

This formula can be tailored to suit a number of different types of scenarios/needs.

  • For any criteria or text that you want to leave BLANK indicate that using two quotes with no space between them like this: “”

  • != can be substituted with == if the statement should read “If VariableName equals criteria...” rather than “If VariableName does not equal criteria...”

  • If the variable in question is a dropdown, the criteria can be set to match a specific answer to the dropdown

  • The Text_if_TRUE and Text_if_FALSE can be hard coded OR can be filled in using a variable from an input in your template

Scenario 3: Other Option Example

In some cases you may want to include an “Other” option for your Listers in the event that a dropdown or radio input does not cover all possible options.

As an example, you may have an “Other” option for Shoe Type which shows an open text field labeled “Shoe Type (Other)” if a lister selects it. In this scenario, you would want the text entered in this field to show up in your title/description rather than the word “Other”

To set this up, we’ll use the same If/Else Statement described above:

  • Base Formula: {{VariableName == "Criteria"? "Text_if_TRUE":"Text_if_FALSE"}}

  • Example Formula: {{type == "Other"? shoeTypeOther:type}}

In plain English this formula reads “If the shoe type equals “Other” show the text entered into the shoeTypeOther field, if not, show the answer to the shoe type field”

VariableName = type

This is the shoe type selected

Criteria = “Other”

This is the option selected in the Shoe Type dropdown

Text_if_TRUE =shoeTypeOther

This indicates that whatever text is entered in the Shoe Type (Other) field should be populated

Text_if_FALSE = type

This indicates that if the shoe type selected is not “other” the shoe type selected in that field should populate

Check Your Work

Once you have updated your title and description, it’s important to check that it works as you expect it to. Use the Preview button to test the functionality and output of the template.

If something isn’t working the way you expect it to, double-check the following:

  • Double curly brackets are used around all statements {{ }}

  • All quotes have an end quotation so there are no open quotes

  • Variable names have been copied correctly

Hidden fields are a powerful tool that allow admins to cut down on manual work for listers and capture various types of edge cases more readily. Please reach out if you have any questions!

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?