I can’t share the read-only link due to there being confidential info on the site.
The page in question is: www.varidiem.com/401
The issue is that I’ve added custom fields to the password submission form and would like the form to email the contents of the submission to a specified email address (eg. like a regular email form).
Does anybody have code, or guidance on code to accomplish the above?
You’d need to build a custom code solution for this, and it could be rather complex depending on what behavior exactly you need, e.g.-
- Email happens regardless of whether the password was legit
- Email only happens if login was successful
These are very different scenarios mechanically.
Also, I’d advise against email as your primary method for transporting the data. too easy for that data to get blocked or deleted. Send it to a webhook that logs it safely somewhere like an Airtable db and then emails you a notification as a secondary step.
For this page, if you were building it custom, you might do best with this design;
- Hide Webflow’s password submit button
- Build your own custom form separately, with your own custom submit button
- Configure it so it does not submit anywhere- the submit is captured by your script
- Include a password field in your own custom form
- When the user clicks your submit button, perform your validation & webhook call to store the data
- On success, then push your password to the hidden Webflow password field, and then “click” trigger Webflow’s hidden login button. If they entered the right password that should work.
You’d need to work out details on this and try some variations to get it working.
In this particular case, I might mix it up and use Webflow Memberships instead. There you can capture and store custom data and there is an email verification step as well.
You’d need a back-end process that when the user verifies email, you look at the affirmation checkbox, and if it’s set, you THEN add them to your special access group for the gated content. That ensures they must have that field checked. Or if you need less security, you can probably just mark it as a required field, and assume they won’t hack the submit form to submit it without that checkbox ticked.
There may be other approaches, I recently saw a Finsweet video on building an age gating screen which might have some good design approaches.
Thanks for the ideas, Michael! Much appreciated.