webographen/statamic-dynamic-token

Dynamic tokens for statically cached forms in Statamic v3

Installs: 5 820

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 1

Type:statamic-addon

v1.0.0 2021-03-13 03:57 UTC

This package is auto-updated.

Last update: 2024-09-27 10:35:26 UTC


README

Statamic 3.0+

Allows you to use standard Statamic v3 forms while also leveraging static caching.

Requirements

  • Statamic v3

Installation

From your site folder, run composer require webographen/statamic-dynamic-token

Usage

Add the {{ dynamic_token }} tag to the view, so it appears on the same page as your form.

The inserted JS adds tokens to all forms that have an input with name="_token".

Tokens are refreshed every 15 minutes to prevent time-out.

Credit

This feature was originally developed by Rob de Kort as part of the Peak Statamic Starter Kit.