Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 31)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

[SOLVED] Prefilling CB Register form with URL info or previous form

  • romolo
  • romolo
  • OFFLINE
  • Posts: 72
  • Thanks: 5
  • Karma: 1
11 years 2 months ago - 11 years 1 month ago #235674 by romolo
Hey All,

I want to catch some basic fields on my spash page of the site.

so:

Gender
Age Range

etc...

This is a teaser form.

Then when they click submit I want that to prefill those fields in the cb register form.

I would think I could do this from one form in I drop into a CUSTOM HTML or article and submit to the register form.

Is this possible and a few points on how to do please.

Many thanks

R
Last edit: 11 years 1 month ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
11 years 2 months ago #235676 by krileon
Ensure your inputs names match the names of your fields then just make sure your splash page does a POST to the registration page. It should then populate what it can perfectly fine. Example as follows.

Code:
<form action="index.php?option=com_comprofiler&task=registers" method="post"> <input type="text" name="name" value="" /> <input type="text" name="username" value="" /> <input type="text" name="email" value="" /> <input type="text" name="cb_myfield" value="" /> </form>


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.

  • romolo
  • romolo
  • OFFLINE
  • Posts: 72
  • Thanks: 5
  • Karma: 1
11 years 2 months ago #235679 by romolo
Thanks Kyle.

That did not works on its own.

I needed to use AutoActions as well.

I followed post: www.joomlapolis.com/forum/255-developer-members-support/222767-solved-separate-registration-procedure?start=6

Are you saying this should work WITHOUT AutoActions now in 1.9

Thanks

R

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
11 years 2 months ago #235681 by krileon
You'll still need CB Auto Actions as it won't populate the $_POST values unless there was an error. You can also try posting to the below URL.

index.php?option=com_comprofiler&task=saveregisters


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.

  • romolo
  • romolo
  • OFFLINE
  • Posts: 72
  • Thanks: 5
  • Karma: 1
11 years 2 months ago #235694 by romolo
Having trouble with a radio field.

Its called cd_gender

and its ids are cb322 and cb323

Cannot get it to pull through, however, I can get username.

How would expect this to appear in HTML and Auto Actions please

R

R

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

  • romolo
  • romolo
  • OFFLINE
  • Posts: 72
  • Thanks: 5
  • Karma: 1
11 years 2 months ago #235695 by romolo
HTML:

<form id="reg_mod" action="index.php?option=com_comprofiler&amp;task=registers" method="post"><input type="hidden" name="option" value="com_comprofiler" /><input type="hidden" name="task" value="registers" /><input type="hidden" name="ismodule" value="yes" />
<div><label for="reg_mod_name">User Name</label><input id="reg_mod_username" class="inputbox input-medium" type="text" name="username" size="14" />
</div>
<div><label for="reg_mod_gender">Gender</label>Male<input id="reg_mod_cbf322" class="pbdintrocheck" type="radio" name="cb_gender" />Female<input id="reg_mod_cbf323" class="pbdintrocheck" type="radio" name="cb_gender" />
</div>
<div><input class="button" type="submit" value="Register" />
</div>
</form>

Auto Actions:

$( '#username' ).val( '[post_username]' );
$( '#cb_gender' ).val( '[post_cbf322]' );
$( '#cb_gender' ).val( '[post_cbf323]' );

What am I doing wrong or missing as its a radio button scenario.

R

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

Moderators: beatnantkrileon
Powered by Kunena Forum