Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

[SOLVED] CB Registration

  • jbrucek
  • jbrucek
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
9 years 9 months ago - 9 years 9 months ago #260484 by jbrucek
[SOLVED] CB Registration was created by jbrucek
Latest Version of CB and Joomla.
Using CB Conditional Plugin
Sourcer Plugin

I have a registration form with some custom fields.
I am capturing a Cell Phone number and then the Cell provider.
When these fields are populated I show a custom HTML field which allows me to write some custom code when clicked. I'm using Sourcer PLUGIN that allows me to write custom HTML, Java Script, or PHP within the HTML field.

I am having trouble capturing the Cell Phone Number field and Cell provider field from the form elements. I know how to capture the data on POST. I want to send a text with the fields provided to verify the user has put in the correct cell and provider. Currently I am doing it after registration which is fine but it would be great to validate it before the registration data is posted.

Is there a way to get these fields before POST?

Thanks, Bruce
Last edit: 9 years 9 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
9 years 9 months ago - 9 years 9 months ago #260517 by krileon
Replied by krileon on topic CB Registration

Is there a way to get these fields before POST?

If your plugin is designed to execute PHP then yes you'd just use PHP to grab the values (e.g. $_POST[ 'FIELD_NAME' ]). There are no substitutions to grab field values from post, but as you're acting on the after registration trigger you might be able to use [FIELD_NAME] substitutions. See the below tutorial for further substitution usage information. I've no idea how this will behave with your plugin though.

www.joomlapolis.com/support/tutorials/107-use-cases/18353-using-substitutions-throughout-cb


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: 9 years 9 months ago by krileon.

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

  • jbrucek
  • jbrucek
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
9 years 9 months ago #260548 by jbrucek
Replied by jbrucek on topic CB Registration
Correct.

I know how to get field data on POST. When I am in the registration form and inspect the page I don't see any of my field elements. Using Google Chrome.

I want to run some code on already populated fields before the REGISTER button is clicked.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
9 years 9 months ago #260585 by krileon
Replied by krileon on topic CB Registration
You can't do that without using an ajax call. PHP is server side. A button click is client side. To do what you're wanting you'd use jQuery to bind to the button click event, which is client side, that sends an ajax call to PHP, which is server side. Your alternative is acting on the before registration trigger, which is fired before the user is stored completely, and do your custom behavior there; there's additional triggers even earlier in the registration process as well (e.g. onBeforeSaveUserRegistrationRequest or onStartSaveUserRegistration).


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.

  • jbrucek
  • jbrucek
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
9 years 9 months ago #260616 by jbrucek
Replied by jbrucek on topic CB Registration
Excellent, Thanks Kyle!

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

Moderators: beatnantkrileon
Powered by Kunena Forum