Custom User Fields
How to setup and access Webflow's Custom User Data fields from WFU
Webflow Memberships allows for custom fields as part of a User's account. These custom fields can be managed through;
- Through the Designer user manager
- Through the Webflow API
- During Sign Up, if you add those fields to the UI
- On the User Account
/user-account
screen, if you add those fields to the UI
We provide access to these fields both through Sygnal Attributes data-binding and directly through JavaScript. All fields are part of the
Sa5User
object, as a map under the data
element.Very important things you need to know when setting this up...
Any Custom User Fields that you want to access MUST exist on your User Account page. To add them, you can simply add those fields to the page from the right-side configurator.
After adding these Custom User Fields and setting up WFU's User Info lib properly, your users MUST log out and then log back in again in order for the newly-accessible custom user field data to load. See the User object Lifecycle for details on how user data loads.
If you do not want your users to see these fields on the User Account screen, you can wrap them in a DIV and hide them using
display: none
on the style tab. Do not try to hide them using Webflow's new visibility feature on the settings tab, as Webflow will not render the elements at all, and the data will not be accessible to WFU for loading.Custom fields are named using Webflow's generated internal field names for each. Typically this process is the same as slug-generation, e.g. a field named
Home Address
would be slugged and internally named as home-address
. e.g.
Full Name
would typically be accessible in the user object as user.data["full-name"]
The Webflow CMS and User data storage systems generate internal field names based on the generated slug, however there are situations where the slug and the internal field name will mismatch. For example, if you rename your slug field, Webflow will keep the original name as its internal field name.
As of Feb-2023, these are Webflow's current field types, and our current plans;
Field Type | Notes | Planned Support |
---|---|---|
Plain Text | max 256 chars | Yes. |
Email | | Yes. |
Link | | Yes. |
Number | Can be defined with a min, max, and step | Yes. Delivered as a string, so that a blank value is identifiable as "" rather than 0. |
Option | Pre-defined options that you choose | Yes. Delivered as the option value. |
Switch | Boolean | Yes. |
File | An uploaded file, such as a profile photo | Not in v3. Looking into how to retrieve the uploaded filename in the future. |
We're working on instructions and/or tools to assist you in identifying Webflow's custom user-field names, which can get confusing if you rename them.
Last modified 1mo ago