Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] GroupJive auto

  • bruno_c
  • bruno_c
  • OFFLINE
  • Posts: 24
  • Thanks: 2
  • Karma: 0
11 years 2 weeks ago - 11 years 2 weeks ago #235328 by bruno_c
[SOLVED] GroupJive auto was created by bruno_c
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 ?
Last edit: 11 years 2 weeks ago by krileon.

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

  • bruno_c
  • bruno_c
  • OFFLINE
  • Posts: 24
  • Thanks: 2
  • Karma: 0
11 years 2 weeks ago #235329 by bruno_c
Replied by bruno_c on topic GroupJive auto
Sorry, i have forgot the printscreen,


Attachments:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
11 years 2 weeks ago #235363 by krileon
Replied by krileon on topic GroupJive auto
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.

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

  • bruno_c
  • bruno_c
  • OFFLINE
  • Posts: 24
  • Thanks: 2
  • Karma: 0
11 years 2 weeks ago #235388 by bruno_c
Replied by bruno_c on topic GroupJive auto
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

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

Moderators: beatnantkrileon
Powered by Kunena Forum