Articles in this section

How to hide a dropdown question if there is only one possible answer

This article explains how to hide Dropdown questions from the response form if they have been filtered and no additional input is required by the end-user. 

  Prerequisites

  • Library and at least one Dynamics module enabled.
  • Templafy Desktop and Office VSTO add-in installed.
  • Admin/owner access to the Templafy tenant and Space owner access.

What is the purpose of the Hide if no interaction checkbox? 

When building smart templates, it might be necessary to filter Dropdown questions by other questions in order to narrow down the results displayed to the end-user. This may result in a single available answer in a filtered question. When there is only one option left on a Dropdown, you can hide this question to avoid prompting the end-users with a question that doesn't require any additional input. 

How to hide a dropdown question if there is only one possible answer

When creating or editing a Dropdown question, the Hide if no interaction checkbox is visible in the Advanced options:
hideifnointeraction.png

  Important

  • The Hide if no interaction option is only relevant if the current question is filtered by another question.
  • For the Dropdown to hide, either the Auto select first option must be checked on the filtered Dropdown, or a Default value should be set on both dropdowns. 

Example

In the example the Offices data source is used where the Country column has a reference to the Countries data source. Note that each country only has one office, except for the United States, which has two offices:

referenceddatasourcecountries.png

A template is created with a 'Country' and 'Office' dropdown question.

The 'Country' dropdown is linked to the Name column of the Countries data source:

dropdowncountry.png

The 'Office' dropdown is linked to the Name column of the Offices data source and filtered by the 'Country' dropdown (marked red). The options Hide if no interaction and Auto select first option are enabled:

dropdownoffice.png

Now when Preview form is clicked, note that the second dropdown 'Office' is only shown when in the 'Country' dropdown 'United States' is selected. In all other cases the second dropdown is not shown, as no interaction is needed, because the other countries only have one office which is automatically selected:

dropdownhideifnointeraction.gif

error messages hostsystem external data sources tech_role
Was this article helpful?
0 out of 1 found this helpful

Comments

0 comments

Article is closed for comments.