Skip to Content Skip to Menu

unsure about trigger actions/conditional or both ? SOLVED

9 years 10 months ago - 9 years 9 months ago #254934 by webiedesign
I am updating a Joomla/Community Builder site from Joomla 1 to Joomla 3.x

I am using Joomla 3.x and Community Builder 2

There are aprox 1700 members that are successfully imported.

When a new member goes to register, they must enter a 7 digit or 1 letter followed by 6 digits member # in the first step of the registration.The member number is unique number assigned by the group (but this does not need to be confirmed at this stage)

I have accomplished this through using the Perl Regular Expression validation of /^[0-9]{7}|[a-zA-Z]{1}[1-9]{6}$/

Ideally we would like to check the database to ensure this number is not already being used by a registered user, and if it is, we would like a message displayed such as "the email address whatever@whatever.com is using that #" and for the registration process to cease.

I have been reading all about conditional fields and action queries for the last 2 days and just can't seem to get my head around what would be the best way, or how to accomplish this. Help ?

Mary
webie-design.com
Last edit: 9 years 9 months ago by webiedesign. Reason: solved

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48482
  • Thanks: 8283
  • Karma: 1443
9 years 10 months ago #254938 by krileon
For what you're wanting you need CB Query Field. It provides a number of Query fieldtypes, but more specifically for your usage is it allows Query Validation for fields. You'd add query validation for it to compare the value the user supplied against the database to see if it's already in use.


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.

9 years 10 months ago #254955 by webiedesign
Replied by webiedesign on topic unsure about trigger actions/conditional or both ?
ok, thanks.

Can I assume this would be in the Integrations/CB Query Field/Query validation of my current text field, as opposed to deleting my current text field and creating a new "query field" ?

In either case, can you give me a start as to what Query I want to make there. (I have been searching for mysql validation query examples for awhile now)

I assume it starts like
SELECT FROM `#__comprofiler_cb_acblno`
or
SELECT `cb_acblno` FROM `#__comprofiler`

and that is about as far as I get....

Mary
webie-design.com

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48482
  • Thanks: 8283
  • Karma: 1443
9 years 10 months ago #255010 by krileon

Can I assume this would be in the Integrations/CB Query Field/Query validation of my current text field, as opposed to deleting my current text field and creating a new "query field" ?

Yup, you add the query validation to your existing fields. No need to make a new field. The below should work.

Query:
Code:
SELECT COUNT(*) FROM `#__comprofiler` WHERE `cb_acblno` = '[value]'
Validate On: Empty Results


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.

9 years 10 months ago #255035 by webiedesign
Replied by webiedesign on topic unsure about trigger actions/conditional or both ?
Thank you for explaining more clearly, it seems like it should work but it doesn't.

I have this running on a local installation,if it would be helpful, I can upload it and provide login details.

Mary
webie-design.com

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48482
  • Thanks: 8283
  • Karma: 1443
9 years 10 months ago #255093 by krileon
Was able to find a bug with the query validation when there is no user object. Fixing for a new release for later today.


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