Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x] Include honeypot in Alpine.js form data #9498

Merged
merged 3 commits into from
Feb 9, 2024

Conversation

duncanmcclean
Copy link
Member

This pull request adds the Honeypot field to the form data object (eg. x-data when using Alpine.js) to prevent forms being processed when the honeypot contains a value.

Although this PR adds the honeypot field to the form data (x-data), developers will still need to add an x-model to the honeypot fields in their templates.

<input id="{{ honeypot }}" type="text" name="{{ honeypot }}" x-model="form.{{ honeypot }}" />

Fixes #9495.

@sjclark
Copy link
Contributor

sjclark commented Feb 9, 2024

Thanks Big D!

@robdekort
Copy link
Contributor

And thanks for the nudge, just pushed an update that adds that attribute to existing peak sites: https://github.com/studio1902/statamic-peak-tools/releases/tag/v4.4.2

@jasonvarga jasonvarga merged commit b2b4546 into 4.x Feb 9, 2024
35 checks passed
@jasonvarga jasonvarga deleted the include-honeypot-in-field-data branch February 9, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Honeypot not included when using precognition and conditional logic Alpine driver
4 participants