Adding Turnstile Spam Protection Breaks Modal Trigger?

I have reconfigured Spam Protection on one of my site’s forms. It now uses Cloudflare Turnstile instead of Honey Pot. Turnstile is working, but the reconfiguration seems to have disabled my modal trigger. (I am popping up a Privacy Policy as a modal.) Is that expected?

The page whose modal trigger no longer works: danielkarslake.com/contact
(click on the Privacy Policy link)

A different site still using Honey Pot that does work: itsalltheragemovie.com/contact
(click on the Privacy Policy link)

Thanks for your help!

Something has happened to malformed the HTML code. In the code, the modal is somehow inside one of the form inputs.

I can’t figure out why just from the live page, would you be able to share your project with us?

Thanks, @ben. I uploaded the project to Elements cloud. (Related question: Whe I upload projects to Elements Cloud, should the Publishing Setup information be deleted before uploading the project? Otherwise my hosting account information is available to whoever looks at it, correct?)

Link: elementsapp://downloadDocument/6rbUNXYUYZmt

Thanks again for your attention.

Hi @randerson27,

Not sure what this is but when I mark it “Hide and don’t publish” then your modal works fine.

That form field doesn’t look like it’s needed?

The password is not contained in the shared project files because that lives in your Apple Keychain. However the username and server hostname/IP address do carry over. If you aren’t bothered with people knowing your username and server hostname/IP address then no worries, otherwise you’d want to remove those before sharing the project file.

Also, your Turnstile secret key is also displayed in the shared project file, so you’ll probably want to regenerate the Turnstile keys since they are available in your shared project file. :slightly_smiling_face:

Dan, thanks so much. The form field you pointed out is necessary. It’s used by the webhook at Make to identify the website sending the form data. (The same webhook handles form submissions from multiple websites.) I first thought to do this using the config_path value sent by Elements, but Ben advised against it in this thread. A hidden input field with the name of the website does the trick.

The reason the Trigger wasn’t working was due to an error on my part. I mistakenly forgot to close the tag in my custom HTML. The malformed HTML caused the error.

I also regenerated my Turnstile keys. Thanks for the heads up. And thanks for your excellent support.

De nada, happy to hear it’s working now. :slightly_smiling_face: