Members
Member variables
Your own fields on every member, such as a plan, a company or a class: their keys and types, defaults, locking, each member's own values, and using them in text and user groups.
What a member variable is
A member variable is a field every member of the website has. Each has a key, a type, a default value for members who have none, and a lock. Show it in any text as {{CVUserCompanyName}}, and build user groups from it.
In the app: Website › Member Variables
Adding a variable
- Press Add Variable.
- Variable Key: type a name such as CompanyName; it becomes CVUserCompanyName. Letters, digits and underscores. The key can't change later.
- Type: Text, Number, True / False or Image URL.
- Default Value: what members without their own value have. It must fit the type.
- Description (Internal) for your team, and Locked (Read-only for users): on, so members can't change it through forms on your site.
- Press Save Variable.
| Type | Values |
|---|---|
| Text | Anything. |
| Number | Such as 12 or -3.5; no thousands separators. |
| True / False | true or false. |
| Image URL | An http or https address of an image, up to 2,048 characters. |
The three kinds of key
- CVUser…
- Your member variables, set by you. Locked to start.
- CVRegForm…
- Registration variables: kept for answers to the registration form.
- CVForm…
- Answers to a form question with a Variable Name, such as {{CVFormCompanyName}}. Visitors who aren't signed in keep theirs in their own browser.
One member's own values
- In the website's Members, press Edit Variables on a member.
- Each variable shows Global Variable; type a value to override the default for this member (Overriding global default). Leave it empty to use the default.
- The lock button cycles Inherit Global, Force Unlocked and Force Locked for this member.
- Add Custom Override adds a key that isn't defined yet. Press Save Variables.
A company name on every page
Worked example: Client portal greeting
- Add CompanyName (Text, no default, Locked).
- For each client member, Edit Variables › CVUserCompanyName = Acme Ltd.
- In the portal's header: a Text Signed in for {{CVUserCompanyName}}, shown to Logged In Users Only.
Ideas to try
- An Image URL variable for each member's own logo, shown in their dashboard.
- A Number variable Credits that a group Low credits (CVUserCredits = 0) uses to show a top-up banner.
- A True / False variable Approved that opens a members' directory to approved members only.