25 Jan, 2017
0 Comments

How to hide or display a block of paragraphs in your custom-made Word?

The Block tags enables you to  display or  hide a  part of your  Word document, which may contain text, tables, images, etc.

General rules:

  • It can be configured with all fields.
  • It is only available for your custom-made Word.
  • It is always on a separate line that will never be displayed.

Note: Block tags do not work in the header of the Word document. It is always built in  two parts to  frame the table or the block of paragraphs to make it appear or disappear: one  tag  before and the same tag  after. Screen-Shot-2017-02-14-at-17.07.16

Block tags Configurations:

How to delete a part of your document in the case of empty or hidden data?

For example, you have a table in your form. You do not want it to appear in your Word document if it is not completed during mobile or tablet entry. The item tag block syntax is:

##_block:field##

Make part of the Word document disappear.

##_block:field##

Conversely, if the field in question is entered on the mobile, the block tag will display the paragraph block that it frames!

For example, you have a table listing your supplies to order on your form. You want it not to appear in your Word document if no lines are entered when typing on the mobile or tablet. The syntax of the block tag is: ##_block:table_supplies##

To make the table disappear

##_block:table_supplies##

(the tag of our table being: ##table_supplies##)

How to display a block of paragraphs by a field list or choice?

The block tags allows you to determine the visibility of a table or a block of paragraphs in your Word document based on a field  list or  choice. For example, you have a field list with the following items (Code:Elément):

  • T:Train
  • C:Car
  • A:Airplane

NB: it is  essential to define a  Code to be able to use this item tags.

You want your block of paragraphs or table in your Word document to appear only if you selected “Airplane” in your list. You must build your block tag in the following manner:

##_block:list-A##

Make part of the Word document appear if “Airplane” is selected.

##_block:list-A##

If you have selected “Train” or “Car” in your field list, your table or block of paragraphs will not appear in your Word document.

For example, you have another list called "Type of Service" with the following choices:

  • 132: New installation (new client),
  • 202: New installation,
  • 334: Repair (new customer),
  • 404: Repair,
  • 536: Replacement (new customer),
  • 606: Replacement.

You want your table to appear, listing the different repairs you offer, only if Repair (new customer) (code 334) and / or Repair (code 404) are selected. In this case it will be necessary to use the operator  -in::

##_block:type_service-in:334,404##

The table with the different repairs.

##_block:type_service-in:334,404##

(the tag of our list being: ##type_service##)

You want your booklet to appear with the different prices of your devices unless Repair (code 334)(new customer) and / or Repair (code 404) are selected. In this case, it will be necessary to use the operator  -nin::

##_block:type_service-nin:334,404##

Text, table or image to appear.

##_block:type_service-nin:334,404## (the tag of our list being: ##type_service##)

You want your paragraph to appear inviting your new customers to subscribe to the loyalty card only if new customer is selected. In this case, it will be necessary to use the operator  -like::

##_block:type_service-like:3##

Text, table or image to appear.

##_block:type_service-like:3##

(the tag of our list being: ##type_service##. 3 is our internal code to signal the presence of a new customer in our files)

You want to remind your customers of the advantages of subscribing to the loyalty card. For this, you want this information to appear only if new client is not selected. In this case, it will be necessary to use the operator  -nlike::

##_block:type_service-nlike:3##

Text, table or image to appear.

##_block:type_service-nlike:3##

(the tag of our list being: ##type_service##. 3 is our internal code to signal the presence of a new customer in our files)

How to display a block of paragraphs or a table determined by a field check box

You want your block of paragraphs or table in your Word document to appear only if you have checked  Yes in the check box. You must build your block tag in the following manner:

##_block:check_box##

Make part of the Word document appear.

##_block:check_box##

You want your block of paragraphs or table in your Word document to appear only if you have checked  No in the check box. You must build your block tag in the following manner:

##_block:check_box-0##  (-zero)

Make part of the Word document appear.

##_block:check_box-0##

How to display a table or a block of paragraph when an input field is empty

You must build your block tag in the following manner:

##_block:field-eq:##

Text, table or image to appear.

##_block:field-eq:##

For example, you want to see a text stating that no comments have been entered when your "Comment" zone is left empty. The syntax of the block tag is:

##_block:comment-eq:##

No comments have been entered.

##_block:comment-eq:##

(the tag of our Input field being: ##comment##).

How to display a table or a block of paragraph when a field is filled?

You must build your block tag in the following manner:

##_block:field-ne:##

Text, table or image to appear.

##_block:field-ne:##

For example, you want your New Customer paragraph to appear when your New Customer Name field is completed. The syntax of the block tag is:

##_block:name_new_customer-ne:##

New customer :

first_name_new_client## ##last_name_new_client##

##address_new_client##

##_block:name_new_customer-ne:##

(the tag of our Input field being: ##name_new_customer##).

How to display a table or a block of paragraph following the entry (or not) of a media of multiple types?

If you want to test the presence of a media n in your form, you will have to build your block tag in the following way:

##_block:field-ge:n##

Text, table or image to appear.

##_block:field-ge:n##

For example, if you would like to see your painting (containing your 4th, 5th and 6th pictures) only if you took a 4th picture, The syntax of the block tag will then be the following:

##_block:photo-ge:4##

##photo:4-200x## ##photo:5-200x## ##photo:6-200x##

##_block:photo-ge:4##

(the tag of our Photo being: ##photo##).

Tip: If you want to test the presence of your 4th photo in your table element in line 1, you can organize your block tag as follows:

##_block:photo[1]-ge:4##

##photo[1]:4-200x## ##photo[1]:5-200x## ##photo[1]:6-200x##

##_block:photo[1]-ge:4##

(The tag of our Photo being: ##photo## and ##photo[n]## allows us to test the presence of a photo in line n).

Block tags and mathematical operators

The following operators allow you to display (or not) a paragraph block according to the information entered:

  • -eq: (equal)
  • -lt: (lesser than)
  • -le: (lesser than or equal to)
  • -ne: (not equal to)
  • -ge: (greater than or equal to)
  • -gt: (greater than)

The syntax is as follows:

##_block:field-lt:3##

Text, table or image to appear. ##_block:field-lt:3##

The information will appear if the field contains a number less than 3.

For example, you want a text to indicate that the delivery is offered when the total order is greater than or equal to 500$. The syntax of the block tag is:

##_block:order-ge:500##

Delivery is offered.

##_block:order-ge:500##

(the tag indicating the total of our order being: ##order##.)

How to display a table or paragraph block depending on the presence or absence of a custom user field?

The _user_ref operator allows you to display a paragraph block based on the presence or absence of a custom user field.

If you want a paragraph block to appear when your user has at least one custom user field:

##_block:_user_ref##

Text, table or image to appear.

##_block:_user_ref##

If you want to make a paragraph block appear when the first custom user field is filled:

##_block:_user_ref1##

Text, table or image to appear.

##_block:_user_ref1##

If you want to make a paragraph block appear when the first custom user field is The United States of America:

##_block:_user_ref1-USA##

Text, table or image to appear.

##_block:_user_ref1-USA## 


To go further with block tags…


 

Go digital today!

Create an account to test the Kizeo Forms App Free of charge for 15 days !


We are available to answer your questions, suggestions, remarks, etc
Would you like to subscribe to our Newsletter?

Tags