Creating a mailing list sign-up form / join a group
Choose this option (rather than a normal Article Form) if you want a user profile to be automatically created and added to a specified group in your database when people submit the form.
1. Find or create a group to which you'd like the people who fill out the form to be added e.g. Mailing list, and make sure it's an Independent group (Group Settings > tick Independent Group box)
2. In the article editor:
-
Click the Insert Component button
-
Choose Profile Editor
-
Change Visible To to Non-logged-in visitors only
-
Set the group next to User applying to group to the group created in step 1
-
Change other settings e.g. Register button text to “Add me to the mailing list”
-
Choose information you want to collect - this can just be name and email address
-
Save
3. You also need to add something that will show for logged-in users. In the article editor:
-
Click the Insert Component button
-
Choose Join Group
-
Change Visibility to Logged-in account holders only
-
Select the group created in step 1
-
Save
Now when a visitor arrives, they will see the form fields to fill in. When a logged-in person views the page, they will simply see “Join mailing list” or “Leave mailing list” depending on their membership status. In both cases, the group will be automatically updated when someone clicks on the link.