Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

DB lookup vs Query ?

  • activha
  • activha
  • OFFLINE
  • Posts: 2336
  • Thanks: 117
  • Karma: 13
12 years 1 month ago #215771 by activha
DB lookup vs Query ? was created by activha
Hello

We use PAP visitor cookie in which we have the affiliate id

We would like to use DB lookup or Query field in order to have the real name of the affiliate displayed in the registration form and check its validity before submitting the registration form

I cannot figure how. Is there any ajax possibility to use the DB lookup field so that it gives the result at the same time of displaying the registration form ?

The DB is shared by joomla and PAP

Do you have any idea of how to do this ?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48700
  • Thanks: 8317
  • Karma: 1447
12 years 1 month ago #215816 by krileon
Replied by krileon on topic Re: DB lookup vs Query ?
I don't think you can use DB lookup field for this unless the field has the cookies value passed to it. It then takes that value and compares it to the database. It should do what you're wanting assuming it has the affiliate id as its value of course.


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.

  • activha
  • activha
  • OFFLINE
  • Posts: 2336
  • Thanks: 117
  • Karma: 13
12 years 1 month ago #216322 by activha
Replied by activha on topic Re: DB lookup vs Query ?
Well I have the value passed with a code to the DB field
However, the field only shows the value and the query is not done

I have taken care of the autoaction being fired before the registration form, the value is correct in the cb DB lookup field, but the Query does not occur for the user to see the result on the registration form

Could you help me on this ?
Screenshots attached
Attachments:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48700
  • Thanks: 8317
  • Karma: 1447
12 years 1 month ago - 12 years 1 month ago #216327 by krileon
Replied by krileon on topic Re: DB lookup vs Query ?
The lookup is done I think onkeyup, so you'll need to trigger that in your CB Auto Action with jQuery (you'll need a new auto action that's jQuery instead of HTML or trigger it using normal JS). Example as follows.

$( '#cb_field' ).trigger( 'keyup' );

It could be keydown, keypress, change, I don't know specifically but you'll need to trigger the appropriate event after the value is changed.


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: 12 years 1 month ago by krileon.

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

  • activha
  • activha
  • OFFLINE
  • Posts: 2336
  • Thanks: 117
  • Karma: 13
12 years 1 month ago #216333 by activha
Replied by activha on topic Re: DB lookup vs Query ?
Well I tried with
jQuery( '#cb_parrainnom' ).trigger( 'keyup' );

But it keeps giving [jquery.form] terminating; zero elements found by selector

I have also noticed that even if I try to manually input a value in the DB lookup field and press keudown there is no feed back nor queries performed.

Can I use this on a registration form to perform a DB check with a value ???

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48700
  • Thanks: 8317
  • Karma: 1447
12 years 1 month ago #216376 by krileon
Replied by krileon on topic Re: DB lookup vs Query ?
Whoops, thought it had an ajax response. It does the check at registration post so when you click register it'll perform the check.


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