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
11 years 8 months ago #227104 by activha
Replied by activha on topic Re: DB lookup vs Query ?

krileon wrote: You're already setting the ID to a CB field so you can do a query in a CB Query Field and substitute in the ID as needed. This won't be ajax of course and is only going to display on profile for example.


This is the point, we need something to display on registration and not on profile.
And if we do a query, this is failing because the query does not seem to get the ID set by js in time.
I have set the ID by autoaction prior to displaying the registration form but there is no way to make the Query work with the substitution.

Do you have an idea ?
I can have the id set as a variable to the url also, could it help to be retrieved prior to the display of the registration form and then work in the query ?
Is there no way to check fields with CB table dynamically during the registration ?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48700
  • Thanks: 8317
  • Karma: 1447
11 years 8 months ago #227105 by krileon
Replied by krileon on topic Re: DB lookup vs Query ?
You'll need to custom develop something then. We don't have anything to provide this.


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
11 years 8 months ago #227116 by activha
Replied by activha on topic Re: DB lookup vs Query ?
Well we don't have the knowledge for it.
Could you suggest someone ? or would CB team do it for an amount ?

In the meanwhile I tried to make it another way by making the CB field containing the ID set by js a condition for displaying another field but this does not work neither.

The condition does not display the second field on first display of the registration form, only if I click on the first field and click enter, then it works.

Seems a problem with CB conditional plugin

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48700
  • Thanks: 8317
  • Karma: 1447
11 years 8 months ago - 11 years 8 months ago #227122 by krileon
Replied by krileon on topic Re: DB lookup vs Query ?

Could you suggest someone ?

You may want to look into hiring someone to develop it for you then.

or would CB team do it for an amount ?

We don't do contract development, sorry.

You could also try using CB Auto Actions to add jQuery to the page that performs an AJAX call and adds the response as HTML to the page; this is probably the most simple solution, but it's still going to take some coding experience as you need to be familiar with jQuery. You can find information on jQuerys AJAX usage below.

api.jquery.com/jQuery.ajax/

In the meanwhile I tried to make it another way by making the CB field containing the ID set by js a condition for displaying another field but this does not work neither.

The condition does not display the second field on first display of the registration form, only if I click on the first field and click enter, then it works.

Seems a problem with CB conditional plugin

You can not set field values using JS and expect anything to work, it won't. Setting a value with JS does not fire events down the DOM. So no other JS knows the field ever changed. You'd need to fire the change event so other JS can be informed of the change (e.g. with jQuery: $( '#cb_myfield' ).trigger( 'change' ); ).


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

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

  • activha
  • activha
  • OFFLINE
  • Posts: 2336
  • Thanks: 117
  • Karma: 13
11 years 8 months ago #227134 by activha
Replied by activha on topic Re: DB lookup vs Query ?

krileon wrote: You'd need to fire the change event so other JS can be informed of the change (e.g. with jQuery: $( '#cb_myfield' ).trigger( 'change' ); ).


Well I tried with both change and keyup but it does not work, where can I check the proper syntax for CB ? I guess it works on enter only

My code is :

<script type="text/javascript">
PostAffTracker.writeAffiliateToCustomField('cb_parrain');
jQuery( '#cb_parrain' ).trigger( 'change' );
</script>

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48700
  • Thanks: 8317
  • Karma: 1447
11 years 8 months ago #227138 by krileon
Replied by krileon on topic Re: DB lookup vs Query ?
You're using PostAfPro API, your change trigger probably is happening before the field is changed. You need to see if PostAfPro has a callback that you can add a function to that'll fire the change event on the field. CB Conditional acts on change and keyup.


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