Skip to Content Skip to Menu

cb_conditionals (fixed)

  • qneal78710
  • qneal78710
  • OFFLINE
  • Posts: 111
  • Thanks: 11
  • Karma: 0
2 years 11 months ago #326984 by qneal78710
cb_conditionals was created by qneal78710
I am trying to learn cb conditionals while viewing the old videos you made back in 2016 which don't look the same as the conditionals do now. I have a check box (multiple checks)
middle school, high school, trade school, college/university

and I have text boxes for each check box. When the user checks one or more boxes, I want the text box to display. How can I do this? I am looking at the cb conditionals and I can't figure out how it works....I understand if-then-else statements but what you have doesn't compute to me.
Attachments:

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

  • beat
  • beat
  • OFFLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
2 years 11 months ago - 2 years 11 months ago #326994 by beat
Replied by beat on topic cb_conditionals
Configure text fields like in your attachment, except for:

- Operator: Contains
- Delimitor: leave it empty (the multi-checkmark field uses the default |*| delimitor.
- Value: the value you want to trigger on

E.g.:

Value for the text field for middle school: middle school
Value for the text field for high school: high school

You should then see the conditioned text field appear and disappear dynamically when editing your user profile (reload that page after each save of the settings).

Edit:
In the "i" fields for each setting there is valuable information. The hint above is in the "i" of the delimiter setting when choosing "Contains".

Does that configuration work for you that way ?

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
Last edit: 2 years 11 months ago by beat.

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

  • qneal78710
  • qneal78710
  • OFFLINE
  • Posts: 111
  • Thanks: 11
  • Karma: 0
2 years 11 months ago #326997 by qneal78710
Replied by qneal78710 on topic cb_conditionals
That's not too clear. So let me understand this. My checkbox has a list Education: Middle School High School College/University
I have three text boxes: (cb_middleschool, cb_highschool, cb_college)

Do I go to the Education checkbox field and do your suggestions or do I go to each text box (cb_middleschool, cb_highschool, cb_college)
and do your suggestions?

I ask because when I go to the Education checkbox field and I click on "Field conditional Show", my profile for that field disappears, it's only when I select "Field Conditional Hide" does the Education checkbox show up in the profile to allow me to edit. This is really weird

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

  • beat
  • beat
  • OFFLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
2 years 11 months ago #327006 by beat
Replied by beat on topic cb_conditionals
Conditions should be applied to the field that you want to show or hide depending on conditions.

If i understand right, you want to show/hide 3 text fields based on checkmarks of a multi-checkmark field.

For that, apply the condition as outlined above to each of the 3 text fields individually (of course putting the corresponding value of the multi-checkmark field, as stated above:

beat wrote: Configure text fields like in your attachment, except for:

- Operator: Contains
- Delimitor: leave it empty (the multi-checkmark field uses the default |*| delimitor).
- Value: the value you want to trigger on

E.g.:

Value for the text field for middle school: middle school
Value for the text field for high school: high school

You should then see the conditioned text field appear and disappear dynamically when editing your user profile (reload that page after each save of the settings).
...


Each of the text field will be hidden when the corresponding checkmark is not checked.

Is that what you wanted to achieve ?

Does it now work for you ?
Does that configuration work for you that way ?

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

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

  • qneal78710
  • qneal78710
  • OFFLINE
  • Posts: 111
  • Thanks: 11
  • Karma: 0
2 years 11 months ago #327026 by qneal78710
Replied by qneal78710 on topic cb_conditionals
Come on Beat, this shouldn't be that hard, it's on day two. I have attached all pics. I'm just trying to show just one text box now. So, when the check box for middle school is checked, then I should see the text box for middle school show so that I can add the middle school name. This isn't happening. I've tried all of the suggestions and it ain't working. The last two pics show that I changed the "Display" to show Field conditional hide and boom...the text box shows up but it shows up even though I have not checked the middle school check box. chekcing and unchecking the box doesn't seem to matter.

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

  • qneal78710
  • qneal78710
  • OFFLINE
  • Posts: 111
  • Thanks: 11
  • Karma: 0
2 years 11 months ago - 2 years 11 months ago #327033 by qneal78710
Replied by qneal78710 on topic cb_conditionals
I think I figured out the problem. I'm doing the conditionals correctly but I think that since I'm using Joomla 4.03, the cb_conditionals aren't working. I say that because you changed the look and code to work differently and it hasn't been tested (I'm assuming you haven't tested) on Joomla 4. If you need access to my backend, I can send you the credentials to login
Last edit: 2 years 11 months ago by qneal78710.

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

Moderators: beatnantkrileon
Powered by Kunena Forum