Captcha Challenge 404 On Custom Forms

Topic summary

Issue: Users implementing custom Shopify Forms with CAPTCHA enabled encounter a 404 error after completing the CAPTCHA challenge. The form redirects to /challenge URL, which doesn’t exist, breaking the submission flow. Additionally, the FORM object isn’t returning expected attributes like ?posted_successfully.

Affected Users: Multiple developers report identical issues when integrating Shopify Forms into custom themes, despite following official documentation. The same setup works correctly with Shopify’s Dawn theme.

Shopify Support Response: Unhelpful—directed users back to community forums without providing solutions.

Working Solution Provided:
WyldCode shared a technical fix involving:

  1. Unbinding Shopify’s default submit hook using jQuery .off('submit')
  2. Attaching custom submit callback
  3. Manually calling RecaptchaV3 JS API to fetch validation token
  4. Adding the g-recaptcha-response token to serialized form payload
  5. Submitting via AJAX to the form action URL

Key Technical Detail: Shopify automatically adds recaptcha validation tokens before submission. Custom implementations must replicate this by manually fetching and including the token in the request payload.

Status: Solution proposed but not yet verified by affected users. Thread remains open for confirmation and further discussion.

Summarized with AI on November 11. AI used: claude-sonnet-4-5-20250929.

I have a custom form for registration and have experienced the same issue with getting redirected back to the /challenge page, which shows a 404 view. Can’t replicate it as it doesn’t seem to happen every time.

Would love to know if anyone has come up with an answer or solution to this problem.