Skip to Content Skip to Menu

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

CB Conditional - Show field 2 for option A or B field 1

8 years 10 months ago - 8 years 10 months ago #275931 by suporteavida
Hi, I have a situation with the conditional CB I am unable to solve. :unsure:

Have a field 1,
with the only choice menu, and it has 5 options A, B, C, D, E.

I have another field 2,
that can only be shown if the field 1 is chosen option D or E.

But I can not make it work with either, :huh:
I tried to use two condition with each other condition and D to E, but this way only considers the first and does not work with the second :S

I tried to make a condition only and as Equals, and in the field to leave both options together D and E separated by comma or semicolon but did not work ... :S

Please, how can I do this to show the second field based on either of the options of the first field? ;)

(pardon my English is very weak, only speak Portuguese here in Brazil :woohoo: )

Ivan Campos, São Paulo-SP, Brasil
Last edit: 8 years 10 months ago by suporteavida.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48464
  • Thanks: 8280
  • Karma: 1443
8 years 10 months ago #275948 by krileon
You can not condition the same field twice. You can only condition a field once. To condition multiple values of 1 field you need to use a REGEX operator. Example as follows.

Operator: Is REGEX
Value: /VALUE_1|VALUE_2/
Translate Value: No

Separate multiple values with |. Note this is REGEX so you need to ensure characters are escaped for regex.


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.
The following user(s) said Thank You: suporteavida

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

8 years 9 months ago - 8 years 9 months ago #276156 by suporteavida
Thank you,
It worked perfect.

I did not know REGEX looks very useful and opens many possibildiades by chance is there any article or tutorial with examples that pose point me to?

Ivan Campos, São Paulo-SP, Brasil
Last edit: 8 years 9 months ago by suporteavida.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48464
  • Thanks: 8280
  • Karma: 1443
8 years 9 months ago #276178 by krileon
The below tutorial details our substitution usage in addition to providing some examples.

www.joomlapolis.com/support/tutorials/107-use-cases/18353-using-substitutions-throughout-cb


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.
The following user(s) said Thank You: suporteavida

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

Moderators: beatnantkrileon
Powered by Kunena Forum