Hide Rows and Sections of Your Output Template

Megan Jackson

Create Even More Dynamic Output Templates

One of the unique features that Forms On Fire gives you is the ability to use Microsoft Word and Excel to create your custom output templates. Did you know you can go above and beyond just inputting the data names in your design?


Situations may arise where you’d like the ability to show or hide sections of your output template based on the outcome of each form submitted. For example, you may have an optional section in your Form that is not displayed or filled out depending on what the mobile app user inputs.


The associated output template will likely have the same requirement – i.e. you don’t want to show a section of the template when it is not needed. Forms On Fire enables you to dynamically hide rows or entire sections of your template using the example outlined below.


Follow Along Example


First, say you have a form design that has several fields that show/hide based on another field. In my example I have a choices field that asks the mobile user “Do you like fruit?” and based on their response I have a textbox field and choices field that hides/shows basedInput Design on the mobile user’s answer. So, if the mobile user chooses the answer “Yes”, then ONLY the text field titled “What’s your favorite fruit?” appears.

On the output template design I have all my sections showing, but I want the sections to show/hide based on the answer the mobile user chooses in the Output Templatequestion “Do you like fruit?”. Since I don’t want to have 2 different connectors with 2 different output template designs (which is still doable and possible), I’m going to use formulas in my output template design.

Dynamically Hiding Sections in Your Output Template Design


To hide a section or row of your Word output template, use the special !HIDEIFSTART placeholder:

{{!HIDEIFSTART(put a formula that evaluates to True/False here)}}


{{!HIDEIFEND}}


Don’t forget to insert your !HIDEEND placeholder or else everything under your !HIDEIFSTART placeholder will be hidden!


So, in my output template I have:


{{!HIDEIFSTART({{Fruit}} = ‘No’)}} on the row I want to hide
{{!HIDEIFEND}} after the row I want to hide


This will hide the content between the START and END placeholders if the {{Fruit}} answer is “No”. I’m going to do the same on the rows associated with this question if the answer is “Yes” on the choices field.

Now when I fill out a form, my output only shows the rows that are associated with the formulas in the output! COOL!

PDF output only showing sections when user answers “No”

PDF output only showing sections when user answers “Yes”

Dynamically Hiding Rows in Output Template Designs (YES YOU HAVE MORE THAN 1 OPTION!)


If you have rows that should only be shown when a specific answer value is given in your form, you’re in luck!! Use the special !HIDEROWIF placeholder to dynamically show/hide a given row:


{{!HIDEROWIF(put a formula that evaluates to True/False here)}}


For example:


{{!HIDEROWIF(string-length({{chosenproduct}}) = 0)}}


which will hide the row if the chosenproduct answer is empty or not set.


This kind of formula is handy if you only want to show output if an answer is given.


Also note that you can also use the !HIDEROWIF placeholder inside a !REPEATSTART section using Excel.


In Word templates, !HIDEROWIF is always evaluated first before any REPEAT syntax is run.


For example in Excel, the row inside the !REPEATSTART / END will be repeated, and selectively hidden based on the selectedanswer value:


{{!REPEATSTART}}


{{!HIDEROWIF( {{selectedanswer}} = ‘Y ‘)}}


{{!REPEATEND}}

 

I know this blog post has A TON of helpful information, and your brain is probably going crazy with all sorts of ideas. If you need any help at all please call our tech support line at: +1 (425) 214-1920 ext. 2

Supported Devices

iPhone - iPad - iPod

Android

Windows 7 & 10

Standard Features

Powerful Drag N' Drop Form Designer

Secure Web Dashboard

Works Offline

Dispatch & Workflow

Image Capture, Annotation & Sketching

Audio & Video

GPS, Mapping & Navigation

Barcode & NFC Scanning

Signature Capture

Data Lookup From Your Systems

Excel & Word Templates

Email PDF


By Megan Jackson | November 11th, 2016 | Form Design


Share by: