Skip to content

Dynamic tokens for statically cached forms in Statamic v3

Notifications You must be signed in to change notification settings

stoffelio/statamic-dynamic-token

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Statamic Dynamic Token

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.

About

Dynamic tokens for statically cached forms in Statamic v3

Resources

Stars

Watchers

Forks

Languages