Waitlist for locked Fluent Community spaces
Has anyone set up a waitlist for locked Fluent Community spaces using FluentCRM Pro, without using a form?
My users are already logged in, so I'd like a "Join Waitlist" button to:
- Apply the appropriate FluentCRM waitlist tag.
- Display a confirmation message ("You've been added to the waitlist...")
- Send the user a confirmation email.
- Notify me that someone joined the waitlist.
I've already created the waitlist tags for each community. Is this possible with FluentCRM/Fluent Community alone, or does it require custom code? Any guidance would be appreciated!
Have you considered using the native setting of enabling "Allow users to request to join to this Space"
They will get a pop up with the confirmation. And you can see the "Waitlist" (called here, "Pending") on the Space overview of Members.
PS.: not sure if it's open via API, but probably you can check via API the community status too (which users are pending). This would be a question for the team.
Thatβs a really good call but I would need it to let me customize the messaging and then add a tag to a specific waitlist community.
I had another look through the developer docs, and I think this should actually be possible with a small custom snippet. There is a space/join_requested action that fires when a user requests to join a Space, so you could automatically apply the corresponding FluentCRM tag and then let FluentCRM handle the confirmation email, admin notification, and any other automation.
So yes, it looks achievable without a form: just not entirely no-code. π
Thank you Jorge! They did send me custom code but I wasn't exactly sure where to put it and how that works with my custom tags. I'm not a technical person so I will just ask them to give me step my step instructions. I appreciate your help.
Patricia MontagnoΒ You're very welcome, Patricia! π
No worries. It's actually pretty straightforward to use snippets thanks to Fluent Snippets.
If it helps, here's the general process:
-
Create one FluentCRM tag for each waitlist (it sounds like you've already done this π).
-
Add the snippet using the Fluent Snippets plugin (or your child theme's
functions.phpif you prefer). -
In the snippet below, simply map each Space ID to the corresponding FluentCRM tag ID.
-
Once a user clicks Request to Join, the snippet applies the correct tag automatically.
-
Then, in FluentCRM, create an automation triggered by Tag Applied to:
- send the confirmation email,
- notify you,
- or do anything else you need.
The only things you'd need to customize in the snippet are the Space IDs and Tag IDs.
It's actually a pretty small snippet once you know those IDs. π
Hope this clarifies where to put that "code".
That being said, just follow the team steps. This is just an aproximation idea haha :)
Draft snippet code you can use (substituting the IDs):
_____Copy from here
/**
-
Add a FluentCRM tag when a user requests to join
-
a specific Fluent Community space.
*/
add_action(
'fluent_community/space/join_requested',
function ($space, $user_id) {if (!function_exists('FluentCrmApi')) { return; } /* * Map each Fluent Community Space ID * to its corresponding FluentCRM tag. * * You may use the tag ID, slug, or title. */ $space_tag_map = [ 123 => 'waitlist-community-one', 456 => 'waitlist-community-two', ]; $space_id = isset($space->id) ? (int) $space->id : 0; if (!$space_id || empty($space_tag_map[$space_id])) { return; } $contact = FluentCrmApi('contacts') ->getContactByUserRef((int) $user_id); if (!$contact) { return; } $contact->attachTags([ $space_tag_map[$space_id], ]);},
10,
2
);
Jorge de los ReyesΒ wizard! Still hard for me to understand but I had to praise you on this one!
AS WΒ thank you !
Nothing fancy tbh. Just the allmighty magic of the WPMN dev docs.
As flexible as always β¨ π§ββοΈ
Jorge de los ReyesΒ dev docs you actually understand how to manipulate. I'm still a noob after 6 months of almost everyday use of wp!
You're the best! Thank you for taking the time to explain this to me. I very much appreciate it!
Patricia MontagnoΒ Happy to help! Let us know if it works!
Will do!