Trigger a community builder user subscription/sign-in with a script

11 months 4 days ago #333678 by huguesmarcil
We understand and all of what you say make sense but could you help us run the API code provided by Joomlapolis ( link to official doc )?

Why do we use this API?
Because we are creating a user registration experience not feasible with native Joomla! (or more complicated than with BreezingForms). So we use the API in a user form whit custom parameters (not concerning CB) in order to let him register.

Please Log in to join the conversation.

11 months 4 days ago #333682 by huguesmarcil
So we just subscribed to Professional Membership to try the CB auto actions.
Can you provide an example of simple subscription using CB auto actions?

Please Log in to join the conversation.

11 months 3 days ago - 11 months 3 days ago #333684 by krileon
You'll need to create an auto action to act as your registration endpoint. To do that create a new auto action with the following.

Global
Triggers: None
Type: Registration
User: Self
Access: All Non-Registered Users
​​​​​​​Action
Approval: Default (CB setting)
Confirmation: Default (CB setting)
Username: [post_INPUT-NAME-HERE]
Email: [post_INPUT-NAME-HERE]
Groups: Registered
First Name: [post_INPUT-NAME-HERE]
Suppress Emails: No

That should be the bare minimum you need to do. Where INPUT-NAME-HERE is replace it with the name of your inputs for those fields. So if you have a field for them to supply username and it has an input name of "user_name" you'd have [post_user_name] for example to pull its form POST data.

Now under Global you'll find a URL for directly accessing this auto action. You'd use that as your forms url.

Because we are creating a user registration experience not feasible with native Joomla! (or more complicated than with BreezingForms). So we use the API in a user form whit custom parameters (not concerning CB) in order to let him register.

Even CBs own registration can't accomplish it? That would be quite surprising to be honest. Our new layouts feature event gives you 100% control over how your registration is rendered. See below on how to use layouts (registration layout shown towards bottom of post).

www.joomlapolis.com/blog/kyle/19009-profile-layouts

​​​​​​​There's not really much else I can suggest without more details about what exactly you're trying to accomplish. Building out a custom implementation for registration shouldn't really be necessary. We're quite receptive to feature requests so if something is needed we're all ears!


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

10 months 3 weeks ago - 10 months 3 weeks ago #333739 by huguesmarcil
Hello Krileon,

Thank you for your great response!

We use BreezingForms because it is simpler to create forms, and because we do not only register users with this form. We also want to create for each user a "project" which is something to enter in another table in the database. Maybe we should use only CB to do this?

I was wondering where should I put the URL in the form.
As I use BreezingForms I do not have access to the <form> tag.
Then I can use the formaction attribute in the <button> tag. But when I do this, nothing happens:
<button formaction="https://dev.partage3d.fr/index.php?option=com_comprofiler&view=pluginclass&plugin=cbautoactions&action=action&actions=99&Itemid=117">Complete registration</button>

Do you know how should I trigger this autoaction?

Currently we trigger the registration script with the onclick attribute and call some after pressing the button.
Do you think we can trigger this autoaction in the php script?

Thank you!

Please Log in to join the conversation.

10 months 3 weeks ago #333742 by krileon

We use BreezingForms because it is simpler to create forms, and because we do not only register users with this form. We also want to create for each user a "project" which is something to enter in another table in the database. Maybe we should use only CB to do this?

You could easily create your project with CB Auto Actions in that case. The SQL action will let you run a custom query against internal and external databases. The Code action will let you run custom PHP. With those 2 alone it's possible to integrate into whatever system you want. So for example you could create CB fields to request project information then you could push those fields values to an external database table using an SQL action.

I was wondering where should I put the URL in the form.
As I use BreezingForms I do not have access to the <form> tag.
Then I can use the formaction attribute in the <button> tag. But when I do this, nothing happens:

I've no experience with BreezingForms so I don't know what parameter or configuration option specifically, but typically it'd just be the form URL so it submits the form to the auto action. Using formaction should work fine as it just changes what URL the form submits to.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

10 months 3 weeks ago - 10 months 3 weeks ago #333776 by huguesmarcil
Hello,

Can you help us integrating CB Auto Actions in our form? Currently we have no clue to understand how it works.
For instance, we thought cURL (php function) could help, but it seems that it does not work and we have no way to check.
Thank you,

Hugues

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.414 seconds

Facebook Twitter LinkedIn