Skip to Content Skip to Menu

🐰 Happy Easter! Great savings on Professional and Developer Memberships! Get 20% off now with code EASTER-2025!

Need support to set correctly a affichage in cb_select box multi

  • sereniteam
  • sereniteam
  • OFFLINE
  • Posts: 247
  • Thanks: 17
  • Karma: 0
2 days 18 hours ago #340894 by sereniteam
Hello, 
I would like to identify the problem when I put the code following a multiple checkbox field I can not display the logos that should be displayed according to the boxes checked in the field “cb_volley” here is the code and here attached the current result :

Code : in the "Mise en page du profil " : 
<div style="display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; padding: 20px;">

    [cb:if cb_volley*="Volley-ball"]
        <img src="/images/mbss/Partenaires/institutions/FFVolley/FFVOLLEY_LOGO_VOLLEYBALL_CMJN.jpg" alt="Volley-ball" style="max-width: 150px; height: auto;" />[cb:if cb_volley*="Beach-volley"]
        <img src="/images/mbss/Partenaires/institutions/FFVolley/FFVAS_LOGO_GREEN%20NO%20BCKG_CMJN%202%201.png" alt="Beach-volley" style="max-width: 150px; height: auto;" />[cb:if cb_volley*="Para-volley"]
        <img src="/images/mbss/Partenaires/institutions/FFVolley/FFVOLLEY_LOGO_VOLLEY_SOURD_CMJN%202%201.png" alt="Para-volley" style="max-width: 150px; height: auto;" />[cb:if cb_volley*="Volley Santé"]
        <img src="/images/mbss/Partenaires/institutions/FFVolley/FFVOLLEY_LOGO_VOLLEY_SANTEi_CMJN.png" alt="Volley Santé" style="max-width: 150px; height: auto;" />[cb:if cb_volley*="Snow-volley"]
        <img src="/images/mbss/Partenaires/institutions/FFVolley/FFVOLLEY_LOGO_VOLLEYBALL_CMJN.jpg" alt="Snow-volley" style="max-width: 150px; height: auto;" />
    [/cb:if][/cb:if][/cb:if][/cb:if][/cb:if]

    </div>
 
 

SereniTeam

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49069
  • Thanks: 8388
  • Karma: 1458
1 day 18 hours ago #340896 by krileon
Remove the nesting of all the if statements and have them be their own if statements. *= also isn't a valid operator. The operators are listed in our substitution tutorial belong along with examples at the bottom.

www.joomlapolis.com/documentation/127-community-builder/279-tutorials/18353-using-substitutions-throughout-cb

Given this is a multi-checkbox you'll need to use the includes operator to check if it includes one of those values. Example as follows.
Code:
[cb:if cb_volley includes "Volley-ball"]IMAGE_HERE[/cb:if] [cb:if cb_volley includes "Beach-volley"]IMAGE_HERE[/cb:if] [cb:if cb_volley includes "Para-volley"]IMAGE_HERE[/cb:if] [cb:if cb_volley includes "Volley Santé"]IMAGE_HERE[/cb:if] [cb:if cb_volley includes "Snow-volley"]IMAGE_HERE[/cb:if]


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