Saving and reusing data in Trap Kit
- You can simulate a lot by just reusing data people enter in a form
- To enable saving on a page, add
save-data: true
to the front matter - Retrieving data uses “get this, put it here” syntax
- Let’s look at an example: Create account template
{% include components/text-input.html label="Full name" type="text" %}
{% include actions/get-data.html get-this="create-your-account-full-name" put-it-here="full-name" %}
{% include components/text-input.html label="Email address" type="email" %}
{% include actions/get-data.html get-this="create-your-account-email-address" put-it-here="email-address" %}