Skip to Content Skip to Menu

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

Special registration form

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
8 years 3 months ago #283464 by fribse2011
Special registration form was created by fribse2011
Hi Guys

Now that you've helped with the mechanics of managing a trial membership of our site, I would like to create a special registration form, that will trigger another page than the one I've set up with Auto-Actions (systemaction).

I was contemplating using Chronoforms for the registration form, and then create a full trial registration form with everything in it.
The CF v5 (whichis current) does not a have a CB registration utility, but they've suggested this code to enter it into CB:
Code:
data['id'] = $user->id; $db = JFactory::getDBO(); $query = " INSERT INTO `#__comprofiler` (`id`, `user_id`) VALUES ('{$user->id}', '{$user->id}') ; "; $db->setQuery($query); if ( !$db->query() ) { JError::raiseWarning(100, $database->getErrorMsg()); } ?>

Is that 'kosher'? Will it work correctly and not break anything?

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

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

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
8 years 3 months ago #283465 by fribse2011
Replied by fribse2011 on topic Special registration form
Never mind, the FAQ was outdated...

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48454
  • Thanks: 8280
  • Karma: 1443
8 years 3 months ago #283490 by krileon
Replied by krileon on topic Special registration form
Direct database insert will not work. You need to use CB API. Below is an up to date usage. I still need to update our tutorial or make a new one entirely for latest usage shown below.

www.joomlapolis.com/forum/153-professional-member-support/228495-solved-cb-version-api-cb-version-2-0-5#258806


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.

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
8 years 1 month ago #285491 by fribse2011
Replied by fribse2011 on topic Special registration form
Hi Kyle

I finally got some more time to look into this.
The link you refer to, is that a complete user registration, or do I need to register the user via Joomla API AND the CB API?

Best regards
Kenneth

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48454
  • Thanks: 8280
  • Karma: 1443
8 years 1 month ago #285521 by krileon
Replied by krileon on topic Special registration form
It's a complete registration. You do not need to use Joomla API at all. Another option is to create a Registration action in CB Auto Actions then redirect or POST to its direct action URL. This eliminates having to write PHP at all as you can just substitute in field data from get/post into the action as needed. If Chronoforms lets you specify a custom URL for the form then that's where you'd supply the direct action URL.


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.
The following user(s) said Thank You: fribse2011

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

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
8 years 1 month ago #286165 by fribse2011
Replied by fribse2011 on topic Special registration form
Hey, that's very clever :-) I'll have a look at that. Thankyou!

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum