1. Knowledge Base
  2. Templates - Create tags
  3. Types of use of opening and closing tags

Tag for text conditioning in unanswered fields

Add specific information when a field is left unanswered in the form.

The tag designed for conditioning information to unanswered fields is a specific type of open and close tag. Its primary purpose is to condition text to only display when a field has not been completed or an option has not been selected in the form.

Let's review what happens in the document when no response is provided for a field:

  • Whether it is a mandatory or optional response, when a field is not completed, an asterisk will appear in its place in the document, indicating that certain information has not been added (you can see this below in use case 1). 
  • The only fields that do not follow this rule are option fields with open and close tags: single choice, multiple choice, and dropdowns. In these cases, if a field is not answered or an option is not selected, no signal will be displayed in the document unless specified by the tags presented in this article (this is illustrated at the end of the article in use case 2).

In this article, we will explore the basic configuration of the tag, its compatible fields, and two different use cases with various possibilities:

Tag configuration

Compatible fields

Use case 1: Field with a simple tag

Use case 2: Field with open and close tags

 

Tag configuration

This tag is constructed as follows:

{^field}Conditional text{/}

 

As you can see, it is divided into two parts:

  • Opening tag ("{^field}"): marks the start of the conditional text. It begins with a caret followed by the field's tag text it will be linked to (in the example above, "field").
  • Closing tag ("{/}"): marks the end of the conditional text. It contains a slash.

If desired, you can add the opening tag text to the closing tag after the slash (for example, "{/field}"). This will help you clearly identify which tag you are closing.

Together, they form a marker that delimits the conditional text. The conditional text is customizable and will only be displayed if the associated field in the form remains unanswered. In other words, if a user leaves the field blank or does not provide the required information, the conditional text will activate and appear in the generated document.

 

Compatible fields

The tag for unanswered fields is compatible with any field that has its own tag:

 

Use case 1: Field with a simple tag

We have created an optional short text field with the tag "email," which will be used to enter an email address.

optional field email

1. Please note that when the field is unanswered, an asterisk appears in its place in the document, indicating that certain information has not been added.

Configuration example 1:

A copy of this document will be sent to the address {email}.

Result example 1:

A copy of this document will be sent to the address *.

 

2. Imagine we also want the message "[Unspecified email]" to appear when the field is left empty. We will configure the tags as follows.

    Ej. de configuración 2:

    A copy of this document will be sent to the address {email}{^email}[Unspecified email]{/}.

    Ej. del resultado 2:

    A copy of this document will be sent to the address *[Unspecified email].

     

    3. We could also display this message without the asterisk. To do this, we need to enclose the field's opening and closing tags within the same field's tags.

    Configuration example 3:

    A copy of this document will be sent to the address {#email}{email}{/}{^email}[Unspecified email]{/}.

    Result example 3:

    A copy of this document will be sent to the address [Unspecified email].

     

    4. We could also add an additional note to record that the user has not indicated an email address:

    Configuration example 4:

    {^email}{name} {lastName} has not provided any contact email address.{/}

    Result example 4:

    Emma Smith has not provided any contact email address.

     

    Use case 2: Field with open and close tags

    We have created a multiple choice field with the tag "clause," which will be used to select all the clauses to include in the contract.

    multiple choice field

    In this case, imagine we want to document the excluded clauses. For this, we create a list that includes the titles of all the clauses, each with its tag for unanswered fields.

    Configuration example:

    EXCLUDED CLAUSES:

    {^clause_A}Exclusivity{/}

    {^clause_B}Breach of Contract{/}

    {^clause_C}Service Level Agreement{/}

    Result example, when selecting clause B in the form and not selecting clauses A and C:

    EXCLUDED CLAUSES:

    Breach of Contract

    Service Level Agreement

     

    In summary, we have demonstrated two use cases, but it is important to highlight that this tag offers a wide variety of applications that can help ensure that no relevant data is overlooked and that documents are accurate and complete, whether by adding notes, alerts, or even symbols in key document locations.