Best practices using webflow forms with my own API

I have the usual type of forms on my site

Login,
Forgot password
Create account

I want them to go off and talk to my backend and do the relevant action. Webflow university only shows really basic stuff regarding forms for contact pages. Is there any information about using webflow but tying in to a seperate backend/api?

Is it just a case of using custom code and preventing the default behavior and having it do whatever I want?

What about when things like login details are wrong, an account already exists etc. how does one handle that with webflow?

Just to be clear, I am not asking how to login to my particular api, but rather a guide to best practices using Webflow forms with my own stuff.

Hey @bob_mcbob!

You can learn a bit more about working with forms and webhooks here: Webflow CMS API Reference

I think what you’re wanting to do would possibly be easier mostly in custom code instead of using Webflow forms.

For your reference, it’s not possible to submit a password field through Webflow forms.

Hopefully that helps get started a bit more and someone else can help with your other questions :slight_smile:

2 Likes

@bob_mcbob you’ve already received some good advice, but I wanted to add a bit more color to your issue based upon my own experience as well.

You have a couple of options (that I’ve personally used) if you don’t want to take on the responsibility of handling user accounts on the backend yourself, but you do want to extend it with custom functionality from your own backend.

Option 1:

Use Webflow Memberships & Logic.

This combo will give you enough to extend their native user membership functionality with your own layered on top.

Option 2:

Use something like Memberstack.

They provide non-native user membership functionality that is more mature than Webflow’s. There are trade-off’s between using the two, but you can evaluate those based upon your needs.

Option 3:

Go super custom and code your very own solution in a similar way that 3rd party memberships services (like Memberstack) do. An example of this might be to use a solution like Firebase.

~

If you need to better get your head wrapped around how some of those options work, you can run through some quick builds on your own.

Here are some tutorials for Webflow Memberships, Webflow Logic, and Memberstack that will definitely help you get up-to-speed, quick.

2 Likes

@ChrisDrit & @jonohale Thanks both for the suggestions.

Our backend is all built, functioning and won’t be changing so I literally just want to use webflow as a wrapper/front for it to make a more attractive experience for people that find our website. I think the suggestion of custom code is the way for me to go.

For your reference, it’s not possible to submit a password field through Webflow forms.

I’m not sure what you mean by that. If I put some custom code in, so when they hit the submit button it prevents default and does my own stuff, presumably I can just get the value of the password field?

2 Likes

@bob_mcbob As long as you use a custom Action for your login/sign up form, you’ll be ok. If there’s no custom action set in the form, it won’t be able to be submitted.

I’m sure if you’ve got code stoping Webflow from submitting the form you should be okay!