Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] getField() function not working as expected

11 years 4 months ago - 11 years 4 months ago #229196 by robemenecker
Hi,

I have a custom web-form (writing to database) that I am working on for a client running Joomla 1.5.26 (yes, out of date) with CB 1.2.3.

I am able to establish a connection to the CB API with the code provided in the Tutorials on the site. However, when I call the getField function it throws the following error at me:

Fatal error: Class 'cbTabs' not found in <span>/</span>home<span>/</span>naaccc/public_html/administrator/components/com_comprofiler/plugin.foundation.php on line 939

Here is the line of code that is precipitating the above error:
Code:
$field = $cb_user->getField('name');

It happens regardless of using a predefined field or a custom field. I am actually trying to get the value of a custom field ('cb_committees').

Any thoughts/ideas?

Full code is attached.

File Attachment:

File Name: cb-getfiel...6-18.txt
File Size:1 KB
Attachments:
Last edit: 11 years 4 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48464
  • Thanks: 8280
  • Karma: 1443
11 years 4 months ago #229204 by krileon
Replied by krileon on topic getField() function not working as expected
Do a full API include above your database include. Full API include is as follows.

cbimport( 'cb.html' );

As is you've included database, language, and foundation, but not class.


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.
The following user(s) said Thank You: robemenecker

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

11 years 4 months ago - 11 years 4 months ago #229208 by robemenecker
Replied by robemenecker on topic getField() function not working as expected
Thanks Kyle,

That got me past the error that the system was throwing. :-)

I was also able to pare back on the "kitchen sink" approach, as I only needed to interface with CB to check the values of a custom field, which would be the trigger for access to a page (form) in the Joomla site. :-)
Last edit: 11 years 4 months ago by robemenecker.

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

Moderators: beatnantkrileon
Powered by Kunena Forum