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

7 months 4 weeks ago #305395 by Digigreg
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.
7 months 4 weeks 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 - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
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 EST to 4:00 PM EST. 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.
Moderators: beatnantkrileon
Time to create page: 0.369 seconds
Facebook Twitter Google LinkedIn