Skip to Content Skip to Menu

Signup after validation

  • adhillon
  • adhillon
  • ONLINE
  • Posts: 143
  • Thanks: 6
  • Karma: 1
20 hours 12 minutes ago #343125 by adhillon
Signup after validation was created by adhillon
I want a signup process based on one required field at signup: (PartnerID)

**Requirement**
 User starts signup by entering a PartnerID during registration.
 If the code exists in a local db table, registration continues and user is activated, otherwise an error message is displayed.

Please advise.
 

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 50085
  • Thanks: 8569
  • Karma: 1468
19 hours 32 minutes ago #343126 by krileon
Replied by krileon on topic Signup after validation
CB Query Field can provide that. Create a Text field then under Integrations > CB Query Field > Validation you can turn on custom query based validation. This will let you query against the database to validate the fields value. This lets you supply custom validation error messages as well.

Next how you display this is up to you. You could put your field on a separate tab then set registration layout in CB > Plugin Management > Default > Layout > Registration to be Step by Step. Ensure that tab is ordered first in CB > Tab Management. Now their first step would be to supply that field and they won't be able to continue until its valid. You could use CB Conditional to hide other fields until that field has a value, but that won't check for validity. Personally I'd just have it as your first field and let the rest of the form display as normally.


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.

  • adhillon
  • adhillon
  • ONLINE
  • Posts: 143
  • Thanks: 6
  • Karma: 1
18 hours 58 minutes ago #343128 by adhillon
Replied by adhillon on topic Signup after validation
i have added a text field 'partnerid' but is shows up in the list as 'cb_partnerid' (just wondering).
What could do in the Query field? Is this a SQL query or another CB value? I am not sure.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 50085
  • Thanks: 8569
  • Karma: 1468
18 hours 44 minutes ago #343130 by krileon
Replied by krileon on topic Signup after validation

i have added a text field 'partnerid' but is shows up in the list as 'cb_partnerid' (just wondering).

Custom fields will always prefix with cb_ so yes that's normal.

What could do in the Query field? Is this a SQL query or another CB value? I am not sure.

You'd have to write the SQL to query your external database to verify the value the user supplied, which will be the [value] substitution as shown in the parameters description.

I cannot help you with the SQL as it's your database so I've no idea what the structure could possibly be. Below is an example though that checks if the supplied value matches a username.

Integrations > CB Query Field > Validation
Query Validation: Enable
Query:
Code:
SELECT 1 FROM `#__users` WHERE `username` = '[value]' LIMIT 1
Validate On: Successful Results
Ajax Validation: Enable


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.

  • adhillon
  • adhillon
  • ONLINE
  • Posts: 143
  • Thanks: 6
  • Karma: 1
18 hours 43 minutes ago #343131 by adhillon
Replied by adhillon on topic Signup after validation
thanks.

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

Moderators: beatnantkrileon
Powered by Kunena Forum