Hi Kyle,
with GroupJive i must create category before create groups
So i try the auto function to do that :
each user registered must complete a french zipcode with 5 digits.
the two first digits indicate the department, the other digits are for the cities.
My idea is to auto-create my categories with the 2 first digits of the zipcode.
i tryed this, but i don't know the good way for have only the first two digits from my cb_zipcode field.
Can you help me ?
You can't use PHP functions inline like that. It does not process them. So the only way to do what you're wanting is to use 2 fields so the 2 values have their own fields or to use CB Query Field to query the database and split it using SQL functions.
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.
Thank you Kyle,
i have created a text field "cb_dept" and with auto-action and js code, i get the two first digits of my "cb_zipcode" and i added a style="display:none" on my "cb_dept" field. Then i used the "cb_dept" field to name my categories with the auto function of GroupJive. It works like i wanted it.
Thank you very much.
The following user(s) said Thank You: nant, krileon