I have a custom cb field, type: checkbox (multiple). In php, would it be possible to get all the labels within that checkbox? I'm using language overrides in the labels.
If you queried for them and ran the labels through CBs CBTxt API, yes. Why are you needing to do this exactly? If you're just trying to get a users translated selected values then substitutions will work fine for that, but if you need them in PHP there's the getFields API which can return the translated selected values as well.
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.
I have a custom made user list view where I have a filtering functionality. User list can be filtered based on what values users have selected in custom cb field, type: checkbox (multiple).
For example:
On registration page there is a checkbox where users can select if they are "student", "employed", "unemployed". Then, the user list can be filtered so that only "student" users are shown.
For filtering, I have a dropdown which I would like to populate with the labels of the multiple checkbox values.
So, in php, is there a way of getting the labels of all the values defined in that checkbox cb field?
You need to load in CB API and pass the untranslated labels through our CBTxt API. See the below on how to load in CB API. Recommend reviewing existing plugins and modules for how to use the API.
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.