Members and forms
Let visitors sign up and sign in, show sections and pages only to members or to a role, and collect messages through forms with an inbox.
A site can have members: visitors who sign up, confirm their address through an emailed link, and sign in. You choose what they see by section or by page. Forms collect messages from any visitor into an inbox, and email them to the recipients you set. This page covers both, because they share the same pieces: a definition in the admin, a section on a page, and a publish.
Before you start #
- You need the Content editor or Super admin role to set up forms and gate sections. A Content author can manage members and read the inbox, but cannot change form settings or visibility.
- Mail must work on the server: invites, confirmation links, password resets and form messages all go through the same mail transport, which whoever runs your Libretto installation sets up (the admin has no setting for it). Without it no email leaves: form messages are still saved in the inbox, but a member you invite is not added, and a visitor who signs up sees an error.
- The site needs a published address, because the links in member emails point to it. An invite on a site with no address is refused with "The site has no address yet, so the invitation link can't name it."
Add sign-up and sign-in to the site #
Members need four pages: sign up, sign in, forgotten password and new password. The starter site already has them at /signup, /login and /reset-password. On another site, build them yourself:
- Open Pages and create a page for each step (for example
signup,login,forgot-password,reset-password). - Open a page in the editor, open the Add panel and search for the members presets: Member sign-up, Member sign-in, Forgotten password and New password. Insert one per page.
- Select the form's section and edit its texts in the inspector: labels, the button text, the success text and one error text per refusal. Each text has a box per site language.
- Publish.
The sign-up form always ends on its "check your email" message, whether or not the address already has an account, so nobody can find out who is a member. The forgotten-password form behaves the same way.
Invite and password-reset emails link to /reset-password. The sign-up confirmation link signs the member in and opens /, where a member also lands after signing in. A members-only page shows guests a link to /login. If your pages live at other paths, name them in the site's members setting (loginPath, resetPath, afterLoginPath). The admin has no screen for it: set it with the settings.update operation (see Settings operations).
Add a logout button #
- In the editor, open the Add panel where the button goes: the header bar, the footer or a page section.
- Insert Logout button.
- In the inspector, set Button text and After signing out (a path on this site, such as
/). - To show it as a link in a footer line or a menu, set Shows as to As a text link.
- Publish.
Only signed-in members see it on the site. In the editor it always shows, so you can place and style it.
Show a section only to members #
- Select the section in the preview or in Layers.
- In the inspector, open Styles and find Who sees this.
- Pick Members for signed-in members only, or Guests for visitors who are not signed in (for example a "Sign up to read more" block). Anyone is the default.
- With Members, you can tick roles under Only members with one of these roles. A member then needs at least one of them.
- Publish.
A guest receives nothing of a members section: the server removes it before it builds the page, so it is not in the HTML, not in the page source, not in the sitemap.
Make a whole page members-only or password-protected #
- Open Pages and choose Edit details on the page.
- Under Access, tick Members only. To limit it further, pick roles under Only members with one of these roles.
- Or type a Password (optional). Every visitor, members included, then has to enter it once in that browser.
- Choose Save, then publish.
To change a password, type a new one in New password (leave empty to keep). To drop it, tick Remove the password. A saved password is never shown again.
Check what each visitor sees #
Above the preview, the Viewing as switch shows the page as a Guest, a Member, or a Member with role … for each role. Member names and emails show sample values. The switch is not saved: the editor opens as a guest every time.
Manage members #
Open People & access › Site members. The list shows each member's Status (Invited, Active or Disabled), Roles and Last sign-in. Filter by status with the tabs All, Invited, Active, Disabled, or Search by name or email.
To invite someone:
- Choose Invite a member.
- Fill in Email, optionally Name, and pick the Email language (The site's language, Italian or English).
- Tick the roles they should hold, then choose Send invitation.
They get a link to choose a password; it works for seven days. For an Invited member, Send again resends it.
On each row:
- Roles opens Roles of …, where you tick roles and choose Save roles.
- Disable signs the member out everywhere at once and stops them signing in. Enable lets them back.
- Delete removes the account after you confirm. They can sign up again later.
Create member roles #
Roles live under the members list, in Roles.
- Type Name in English and Name in Italian.
- Choose Add role.
Each role shows its key and Members: …, the number of members holding it. The key comes from the name when you add the role and never changes, because gated sections refer to it.
Set up a form #
- Open Content › Forms, type a name under New form (for example "Contact") and choose Create form. The form starts with a name, an email and a message field, and opens on Form settings.
- Under Fields, set each field's Label, Type (Short text, Long text, Email address, Phone number, Date, Choice, Checkbox), Required and Help under the field (optional). Use Add a field, Move up and Remove field to shape the list. Visitors fill the fields in this order.
- Under Who receives it, fill in Recipients, one email address per line, the Sender name, and under Reply to the address in the field that holds the visitor's email.
- Under Checks, choose:
- Ask for consent to the privacy notice (the text and the link are set on the form section);
- Add a hidden field that only spam bots fill;
- Refuse a message sent sooner than this after the page opened (seconds);
- Accept new messages: untick it to close the form.
- Choose Save. The settings are live as soon as you save.
- Under Send a test, choose Preview the test email to see the recipients, the subject and the body with sample answers, then Send it to the recipients to check it arrives.
Put the form on a page #
- In the editor, open the Add panel and insert the Form preset.
- In the inspector, pick your form in the Form field.
- Write the Send button, Thank-you title, Thank-you message, Error title and Error message. If the form asks for consent, also write the Consent text, the Privacy link text and pick the Privacy page.
- Publish. The section's texts go live with the publish; the form's fields and checks were live from their save.
Read and export messages #
Open Content › Forms and choose a form. The inbox has the tabs New, Read and Archived. Opening a new message marks it read. In a message:
- Mark as unread puts it back in New;
- Archive moves it to Archived, and Move back to read undoes that;
- Privacy consent shows Given or Not given.
Export CSV downloads every message of the form, newest first: one column per field, then the date, the status and the consent. It opens correctly in a spreadsheet, accented letters included.
What you see #
- The Members list grows as visitors sign up; a new sign-up stays Invited until they click the link in their email.
- The site's forms page lists each form with Unread and Messages counts.
- On the site, a sent form shows its thank-you title and message in place of the fields.
Pitfalls #
Pitfall: A section in the header or footer set to Members or Guests shows to nobody on the public site, members included. The header and footer are one copy for every visitor. Keep gated content in the page; the Viewing as preview does not show this limit.
Pitfall: Deleting a role takes it off every member, and a section shown only to that role then shows to no member. If pages require the role, the confirmation says how many: "The role is required by … : it will be taken off."
- A field's key names its value in the inbox and the CSV, so it cannot change once the form is saved. Pick labels you will keep before the first save.
- Send a test uses the saved form. Save first, or you test the old version. A form without recipients cannot send a test.
- A members-only article or collection page is hidden from guests in every list, even its title and image. A child-page list never shows members-only or password pages, to members either.
- A form with no recipients only keeps messages in the inbox. Nobody is told a message arrived.
- Sign out all members is not on the Members page. It is in Site settings › Security, for the Super admin only, and it cannot be undone.
- In Italian, the admin calls members "Iscritti" in the menu and "Membro" or "Utenti registrati" in the editor. They are the same people.
Related #
Something wrong on this page? Write to docs@librettocms.com.