Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] Different Registration forms.. or at least auto-populate field

  • cberry1971
  • cberry1971
  • OFFLINE
  • Posts: 125
  • Thanks: 7
  • Karma: 0
11 years 10 months ago - 11 years 8 months ago #216244 by cberry1971
I have two types of users (Athlete, Event). Right now they register and identify themselves here:

wodrocket.com/index.php?option=com_comprofiler&task=registers&Itemid=167

I want to create two buttons on my homepage:

"Athletes Sign Up Here"

"Events Sign Up Here"

And then (based on which button) have my custom field cb_accounttype auto-populate (Athlete or Event).... is this possible?
Last edit: 11 years 8 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
11 years 10 months ago - 11 years 10 months ago #216254 by krileon
Yes, you'll need to supply the URLs with a custom GET variable (e.g. &type=Athelete) and use CB Auto Actions to populate your field based off the get variable using jQuery. Example as follows.

Type: Code
Triggers: onBeforeRegisterFormDisplay
Access: Everybody
Conditiona: [get_type] Is REGEX /Athlete|Event/
Method: jQuery
Code:
Code:
$( '#cb_accounttype' ).val( '[get_type]' );


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.
Last edit: 11 years 10 months ago by krileon.
The following user(s) said Thank You: cberry1971

Please Log in or Create an account to join the conversation.

  • chris1122
  • chris1122
  • OFFLINE
  • Posts: 30
  • Thanks: 1
  • Karma: 0
11 years 8 months ago #221136 by chris1122
Can you please further clarify this....

where does this cide go?

$( '#cb_accounttype' ).val( '[get_type]' );

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
11 years 8 months ago #221191 by krileon
In the "Code" parameter of a Code action.


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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum