am i correct for custom scenario after registration?

4 years 7 months ago - 4 years 7 months ago #314394 by saman2
Hi
I want have multi path for multi CB registration. for example mysite.com/A and mysite.com/B (for this, i use CB registration menu item and custom alias)
when users use /A link for register , then redirect user after registration to mysite.com/1 and for B is similar to mysite.com/2.
i use CB Auto Action for implement this scenario . my problem is how to understand my user use mysite.com/A or /B in CB Auto Action? am i must use Condition tab in auto action and set Field to value, then use global variable substitution?
is my way is correct to implement my need with this way?

Please Log in to join the conversation.

4 years 7 months ago #314411 by krileon
The form URL used on registration has nothing to do with the URL used for display the registration form. So the only way for CB Auto Actions to know where they're coming from like that is to have a form input that provides that information. This means you'd need to have a hidden input in the form where you set its value based off the URL they're using to view the registration form. Easiest way to do that is probably something like the below.

Global
Triggers: onBeforeRegisterFormDisplay
Type: Code
User: Automatic
Access: Everybody
Conditions
1: [get_itemid] Equal To MENU_ID_HERE
Action
Method: HTML
Code:
HIDDEN_INPUT_HERE
Output
Display: return

Note this is untested and just an example. You very likely will need to make adjustments. Your redirect auto action acting on onAfterSaveUserRegistration should in theory then be able to condition against [post_HIDDEN_INPUT_NAME].


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.

4 years 7 months ago #314427 by saman2

krileon wrote: Code:

HIDDEN_INPUT_HERE

how can i have hidden input field in the <form> of CB registration form?
i try to that but can not implement in the form tag, remind: i need get that value in the [post_hidden input name].

Please Log in to join the conversation.

4 years 7 months ago #314432 by krileon
Looks like that trigger adds its results outside the form element. The alternative then is to use a Custom HTML field and add your hidden input there. You'd then condition the Custom HTML field to show/hide using CB Conditional and custom value conditioning. Example as follows.

Field: Custom > Value
Custom Value: [get_itemid]
Translate Custom Value: No
Operator: Equal To
Value: MENU_ID_HERE
Translate Value: No


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.

Moderators: beatnantkrileon
Time to create page: 0.197 seconds

Facebook Twitter LinkedIn