Documentation

JSON Web Token Field

After activating the JWT Prefill Add-on, you’ll have an extra Gravity Forms Field available in your Form Builder, under Add Fields > Advanced Fields. If you want extract claims with a Merge Tag modifier, you’ll need to add the JSON Web Token Field to your form. This is also needed to validate if the token is valid in every step of your Form.

Make also sure you’ve configured the settings of JWT Prefill in the Form Settings.

Placement of expiration message

In the JSON Web Token Field, under Appearance, you’ll find an extra input field for ‘Queryselector for expiration message’.

By default the Queryselector is filled in with the .gform_wrapper class. This will output the expiration message just after the div that contains gform_wrapper.

The expiration message will be visible just above the Form Title (if Show Form Title is enabled), and otherwise just above the progress bar or above the first Form Field). It will look like this in the browser:

Extracting JWT claims with a Merge Tag

In our Form we’ve added a JSON Web Token with Field ID 2. To show the value of the JSON Web Token we use the Merge Tag:

{JSON Web Token:2}

If we want to extract a claim from the token, we can add a modifier. For example, if the token contains a claim ‘text’, we can simply add :text after the Field ID of the token en extract the value from the text claim.

{JSON Web Token:2:text}
JWT Prefillv1.2.4

For this functionality (using JSON Webtokens to populate fields) you need to activate the GravityWP - JWT Prefill Add-on.

Read more

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close