Toggle menu

Form Page Blocks

These blocks are used when navigating between pages and to manage repeating pages.

Add an Instance of a Page

utilAddNewPageInstance
 
utilAddNewPageInstance - append
 

These blocks add a new page instance immediately after the current instance, or at the set position. You could add an instance to the end of the current set using:

appendinstance
 

Instance Counts and Validation

getPageInstanceCount
 
getPageInstanceMin
 
getPageInstanceMax
 
isPageInstanceCountValidated
 
validatePageInstanceCount
 

Use these blocks to count how many instances exist and check what the minimum and maximum number of instances are set as in the page settings. All counts return integers.

You can also check if the instance count is validated in the page settings (the block returns true or false) and validate the current count. Validating the count returns one of:

  • -1 - The count of instances is less than the minimum
  • 0 - The count of instances is between the minimum and maximum (inclusive)
  • 1 - The count of instances exceeds the maximum

Getting the Page Instance

getPageInstance
 
getPageInstanceDisplay
 

These blocks return the current page instance number. Because page instance counts are zero-based (the first instance is 0) the "displayable" version of the block starts at 1.

First Time on Page or Instance

isFirstTimeOnCurrentPage
 
isFirstTimeOnCurrentPage
 

Check whether this is the first time on this page or instance. These blocks return true or false.

Page Settings and Navigation

getPageName
 
getPreviousPageName
 
isPageInstanceCountValidated
 

These first blocks return the page name and check whether or not the page is repeatable.

getpagenames
 

This block returns the names and titles of all of the pages in the form. See .getPageNames for an example.

getPreviousNavigablePageInstance
 
getPreviousPageInstance
 

These blocks are useful when navigating between page instances. They return the index (an integer) of the page the user was last on. In some circumstances, like when deleting a page instance, the previous page instance may have been deleted. The "navigable" block only returns an instance that does exist, or the next in the index if the instance has been deleted.

Map - page, instance and mode
 
Map - page and instance
 
page in edit mode
 

Use these blocks when building navigation functions, see the "Navigation Function" section of Page Modes for more information.

Page Mode and State

Mode
 
getRepeatingPageState
 

Repeating pages have three modes. The default/no mode (when someone is filling out a page), edit, and remove.

The mode block returns null (if the page instance isn't in a particular mode), EDIT or REMOVE.

The page state holds information about a repeating page. State is described fully in the .getRepeatingPageState article.

Removing Pages

utilRemovePageData - all
 
utilRemovePageData - instance
 

Use these blocks to remove a page or a particular instance of a page. The "remove all instances" block works on repeating and non-repeating pages.

Page Submission Information

querySubmissionAction
 
querySubmissionActionFieldName
 
querySubmissionActionIdentifier
 
querySubmissionActionLabel
 

These blocks return information about the action or button that caused the page to be submitted. There's more information about them in the following articles:

Last modified on 16 November 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon