Toggle menu

Map Blocks

These blocks work with JavaScript maps. Almost all blocks can be used browser-side and server-side.

URL Parameters

URL Parameters

This block creates a map from the URL parameters of the current page.

For example, adding the following blocks to a page level handler:

URL Parameter Map Example

on a form with this URL:

www.mysite.com/testform?pageSessionId=f8eeb04e-10b4-4e3e-a84b-b4487f8ebf57&fsn=7cb273a3-97eb-443c-a2cf-5ebdbab8b899

would create this form helper variable:

URLPARAMS = {
    "pageSessionId": "f8eeb04e-10b4-4e3e-a84b-b4487f8ebf57",
    "fsn": "7cb273a3-97eb-443c-a2cf-5ebdbab8b899"
}

You cause the block in server or browser-side functions to set the values of fields.

With a URL like: https://docs.gossinteractive.com/article/4398?REFERENCE=123

You could set the value of a field to that reference number using:

URL Parameters - Default Function

Validation Failed

Validation Failed

This block is designed to be used in validation functions. It sets the result as invalid and throws an error that can be caught by the field's error message function.

{
    isValid: false,
    errorType: 'CUSTOM_ERROR'
}

See Error Message Functions for an example.

Last modified on November 13, 2024

Share this page

Facebook icon Twitter icon email icon

Print

print icon