Skip to Content Skip to Menu

How to pass correctly multiple-checkbox value(s) to database

  • Digigreg
  • Digigreg
  • OFFLINE
  • Posts: 38
  • Thanks: 8
  • Karma: 0
6 years 6 months ago #305395 by Digigreg
Hello,
i'm creating an app connected to a Joomla-CB powered website.

I'm making some Ajax calls to read and write in the database.

All works properly also with CB users data, with this exception: when I need to save a multiple-checkbox value into the database, if I send onle one value (for example "test"), then all works perfectly, if I send more values separated with the default CB separator (for example "test|*|test2|*|test3"), then nothing is written into the database. I'm guessing that, there is a special filter or function in a CB controller to manage this situation. Could you please explain me how I can let it works?

Many thanks,
Kind regards.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48680
  • Thanks: 8313
  • Karma: 1446
6 years 6 months ago #305403 by krileon
I've no clue how you're trying to store data in the database so I've no idea what to suggest. Multi-select and Multi-checkbox fields store their values as |*| delimitered so test_1|*|test_2|*|test_3 is correct and valid.


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