I have a few general Webflow form questions, and a specific one below:
Is there a way to return data to a Webflow page? Say for example that I POST the data to a custom action URL or API endpoint where I want to process the form input in some way, then return a message. Can I capture and display that?
How do you handle error messaging for custom action URLs? Related to above: if I POST a newsletter subscribe to Mailchimp, say, and there’s a problem adding the new user, Webflow will automatically report the “success” message if it writes to the Webflow form entries database. But if it doesn’t add the user, it’s failed… how do I capture that?
Related again: if I prevent.default on the submit handler to perform some AJAX, can I do something with that on the form before submitting?
I’m integrating Stripe donations into my Webflow site using a Webflow form. It’s fairly straightforward to use the Webflow Embed element to include a Stripe Elements card, which is used to generate the token via AJAX, which is appended and sent when the form is submitted. But if for whatever reason the charge doesn’t go through – bad credit card, etc. – I can’t simply show the default Webflow success message.
And, actually, one more question: can I submit to a different page? Like one thing would work is if I POST to another URL, do the processing, and then use the server side logic to “return” the user to a /success or /error page on the site. I don’t need to be too specific with the error messaging, but I don’t see a way at the moment.
Any thoughts or guidance would be most welcome! I use Webflow for basically everything these days, and with Zapier I can do literally everything I want. But I’m puzzled trying to suss out a recurring billing workflow with Stripe, which requires the server side logic to return success/failure data (I should point out that the server side piece works fine, I’m just having trouble with the Webflow forms integration.)
Thank you so much!!