Require user authentication for form submission

I’m designing a sign-up page for Early Access testers, with a form collecting some basic company and user data required for evaluating their eligibility to participate in the program.

While the page with the form needs to be publicly accessible (not gated), I need to ensure that form submissions are associated with member accounts.

The desired flow would be:

  1. Unauthenticated user views the page with a form and fills it out.
  2. Upon clicking “Submit”, they are presented either the standard Memberstack login or sign-up modal, or a custom Webflow login / sign-up page (no preference).
  3. After successfully authenticating, the form gets submitted, and its field values update the member record.
    Optionally (not essential): If the user fails to authenticate, we would present them some message informing them that they need to sign-up and authenticate to be able to submit the form.

Is this achievable? Thanks for your support!

It’s a little bit convoluted- I’d usually require the enrollment first and then give form access, so that the account is fully created before you’re binding data to it.

That said, this is sort of possible in Webflow memberships, and is probably possible in Memberstack as well;

  • In your form, collect username and email, check them for format
  • On submission,
    • call the Webflow API to issue an account invite to that email address ( Memberstack may be able to do email invites also ).
    • store the form data safely, e.g. in Airtable, with the User ID returned by the API
  • Make it clear to the user that their submission cannot be processed until they check their email and complete account activation.

Later on account activation, you can tap into the wf-user-updated webhook, and update Airtable so that you know the account is fully activated. That will give you a single view of ready-to-process applications.

2 Likes

Also, check this out! You can just pass through the data via URL parameters, and then have it hidden on the signup form. Send Email From Lead Capture To Signup Form - Webflow

2 Likes

Thank you Michael and Julian for your recommendations!

I have meanwhile also experimented a bit more and ended up with the below 3-step process setup, which is good enough for our use case:

Step 1: Unauthenticated user: We show a form with OAuth sign-up buttons. Upon successfully signing up (and at the same time logging in), the user is redirected back to the Early Access page as configured in [Memberstack | Plans | Redirect | On Sign-Up]. In other words, the page refreshes.

Step 2: Now that the user is authenticated, we hide the Sign-Up form and show a form with supplemental user input fields (title, company, phone, etc.) on the same page, configured as a Memberstack profile update form.

The Submit button has a custom attribute ms-code-refresh=”500”. This triggers page refresh using custom Java Script snippet in the body, configured as per #15 - Refresh Page After Set Duration On Click | Webflow Powerups.

Step 3: Now that the custom fields have been populated by the user, we check one them for a value following #10 - Display/Remove Element based on Custom Field | Webflow Powerups. If the custom value is present, we:

  • Display a “Thank you for signing up!” element
  • Hide the #2 form

Hope this helps other people who may have a similar need in the future.