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

Invalid email address in payment field #2262

Open
rdkhunt opened this issue Jan 24, 2025 · 9 comments
Open

Invalid email address in payment field #2262

rdkhunt opened this issue Jan 24, 2025 · 9 comments

Comments

@rdkhunt
Copy link

rdkhunt commented Jan 24, 2025

Describe the bug

We are experiencing an issue with one of our forms: "Couldn’t save submission due to errors. Invalid email address."
Please see the attached screenshot for reference.

I have upgraded Formie to the latest version, but the issue persists. The payment integration is set up with Stripe.

I also have another site running Craft CMS 4 with Formie, and that setup is working without any issues. This leads me to believe that the issue may be related to compatibility between the latest version of Formie and Craft CMS 5, or there could be a bug in the Formie plugin.

Can you please investigate this issue and let me know how we can resolve it?

Steps to reproduce

1.Create a payment form with fields for Name, Email Address, Amount, and Payment.
2.Integrate the Payment field with Stripe using the Stripe keys.
3.Now, test the form.

Form settings

  • Multi-page form: No
  • Submission Method: Ajax or Page Reload - We have tried with both
  • Client-side Validation: Yes
  • Custom Form Templates: Yes or No

Craft CMS version

5.5.8

Plugin version

3.0.19

Multi-site?

No

Additional context

Image

@engram-design
Copy link
Member

Can you check your logs at /storage/logs/formie.log? I don't think this is related to your Email field, it's likely your Billing Address Email field in the Payment field settings
.

@rdkhunt
Copy link
Author

rdkhunt commented Jan 24, 2025 via email

@engram-design
Copy link
Member

What does your Billing details look like for the field? Is it mapped to the correct field?

@rdkhunt
Copy link
Author

rdkhunt commented Jan 24, 2025 via email

@rdkhunt
Copy link
Author

rdkhunt commented Jan 24, 2025 via email

@engram-design
Copy link
Member

I don't believe the screenshot has attached, as you've replied via email. I do believe it's these values:

Image

In particular, these should've been migrated to a slightly different format in Formie 3, from {field.email} to {field:email}

@engram-design
Copy link
Member

I did get a similar email through support (not sure if you), but recommended to check the logged-in status of the user when testing the form, due to mapping "User Email" to the "Email Address" setting for Stripe receipts. This will required a logged-in user to Craft.

@rdkhunt
Copy link
Author

rdkhunt commented Jan 27, 2025

I have fixed the email issue. Now, we are observing another issue: [ERROR] Couldn’t save submission due to errors - {"payment":[""]}.

Image

@engram-design
Copy link
Member

Indeed, it looks like the front-end JS is not creating the stripePaymentIntentId which is required to send to the server to initiate payment. That process is all done on the front-end with Stripe's hosted JS.

Can you see if there are any JS errors on your front-end when submitting the form?

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

No branches or pull requests

2 participants