Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Black Friday Intro Offer for your subscription's lifetime
🎉 Black Friday sale is here! Great savings on professional and developer memberships! Get 25% off now with code BLACK-FRIDAY-2024!

Field group values

5 years 8 months ago #311095 by dhananjay_vp
Replied by dhananjay_vp on topic Field group values
Hi Kyle,

I am on MySQL 5.6, I don't think json_decode function supported by MySQL 5.6.

How are you decoding data from database at application level while showing on forms?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
5 years 8 months ago #311111 by krileon
Replied by krileon on topic Field group values

I am on MySQL 5.6, I don't think json_decode function supported by MySQL 5.6.

I recommend upgrading to MySQL 5.7 in that case as Field Groups are not operating as efficiently as they can as they'll fallback to text columns instead of json columns.

How are you decoding data from database at application level while showing on forms?

They're just json_decoded and looped through.


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.

5 years 8 months ago #311124 by dhananjay_vp
Replied by dhananjay_vp on topic Field group values

They're just json_decoded and looped through.


In which file I will be able see that piece of code. It will be great help

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
5 years 8 months ago #311125 by krileon
Replied by krileon on topic Field group values
We're using our Registry API to parse through it, which isn't going to apply anywhere outside of CB. What are you trying to do exactly? If you need to parse through the values externally you should just be able to json_decode and loop through the arrays. Something like the below.

Code:
foreach ( json_decode( $json ) as $row ) { foreach ( $row as $fieldName => $value ) { echo $value; } }


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