Dynamic Element Codes

You can add dynamic text to your templates, such as Page Numbers, the Unique ID of the final documents or even text from another field within the form using Dynamic Element Code.

It's really easy to do, just follow these steps:

  1. Add a Text Box Element to your template;
  2. Give it a name starting with the @ symbol, ie: @pagenumbers (this step is very important as the system uses this to know which text boxes include dynamic text)
  3. Edit the content of the Text Box Element to include any of the dynamic text outlined below. Example: {page_number}

Element codes can be used together aswell, so you can create one Text Box Element named @pagenumbers and have the text say:

Page {page_number} of {toal_pages} pages

which would end up displaying something like:

Page 2 of 10 pages  

You can see an example of the output on the bottom left of the Booking Form Example template.

List of Dynamic Element Codes

Below is a list of all the codes currently implemented with a description and some example text for how you could use them.

Document UID

Text: {document_uid}
Description: Use to display the Unique Document Identifier on this document. This is useful when you expect the completed document to be printed and faxed or mailed, so that you have a reference ID that can be used to find the digital entry. Every entry made to your templates has a DocumentUID, and you can search on them within the Entries page.
Example Text: Administration Document ID: {document_uid}

Page Number

Text: {page_number}
Description: Use to display the current page number on the document.
Example Text: Current page: {page_number}

Total Pages

Text: {total_pages}
Description: Use to display the total count of pages on the document.
Example Text: Total Pages: {total_pages}

Another Elements Text 

This feature is a little different than the previous 3, as it allows you to re-use the text of another element. The replacement occurs in the final PDF or CSV download. (Unlike the previous dynamic codes, which can be replaced when the web form is shown. As the user has not entered any values for this one yet, we can't replace until the form is submitted.)

The UniqueID of an element is found in the editor when creating your form, on the left menu in the "Name, value & display" section. It must be preceded with the to letter "el" (that's a lower case E and L), then a colon.

Text: {el:<another_elements_unique_id>}
Description: Use this to render another elements text in this element when the PDF is created
Example Text: {el:a1b2c3d4e5f6g7h8}
Example Usage:

  1. You have a Text element on page 1 that the user can enter their name into. You want this name to also appear on page 2.
  2. First, you get the unique ID of the element on page 1 where the user will type their name. The unique ID of an element is found on the left menu in the "Name, value & display" section when the element is selected. It is a 16 character value that looks similar to this: c96e07cd3fedd5b1
  3. Next you go to the second page and select the second element where you want the name to appear.
  4. Name this element something that begins with the @ symbol. (it can be anything, but the @ tells the system it is dynamic)
  5. Double click the element and enter the following - {el:unique_id_from_step_1} (this will look something like this {el:c96e07cd3fedd5b1}
  6. Save and publish your template.

Now when the form is submitted, the value from Element 1 will be placed into Element 2 in the final PDF and the CSV downloads from the entries page.

If you want to hide the code that can be seen within element 2 on your web form, you can place another element over the top that has a colored background, and then uncheck that elements "Display in downloads" setting so that it is removed in the PDF.