Skip to Content Skip to Menu

[SOLVED] Limitation on Conditions on CB Fields to show plan at registration

  • galanopd
  • galanopd
  • OFFLINE
  • Posts: 374
  • Thanks: 49
  • Karma: 8
2 years 8 months ago - 2 years 8 months ago #328466 by galanopd
In Conditions on CB Fields to show plan at registration, I can't add more than one rule and I can't figure out how to solve this
My field has values = one, one-plus, two, two-plus

Now, how can I show the plan in case field value = one, two and two-plus but not one-plus ?

If I use "Matches Regexp below" /one|two|two-plus/ will also bring up the plan connected to one-plus and will show 2 plans which is expected since the word one exists in both. Something like /^(?!.*?one-plus).*|one|two|two-plus/ in an effort to negate the whole value (one-plus) doesn't seem to work ok.

Alernatively is there a way to declare at once the 3 values (one, two and two-plus) in "= (Is equal to) value ?
Last edit: 2 years 8 months ago by krileon. Reason: Added [SOLVED] tag to subject

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

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
2 years 8 months ago #328473 by krileon
So you want to show the field if at least 1 of the supplied plans is selected? That's how it should already work. Example as follows.

Field: Subscriptions
User: Displayed User
Operator: Has
Plans: SELECT_ALL_3_PLANS_HERE
Status: Selected, Active

That should display the field if at least 1 of the plans is selected or active.

I've no idea what you're saying in regards to using REGEXP. You can't use REGEXP matching for subscriptions condition in CB Conditional.


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.

  • galanopd
  • galanopd
  • OFFLINE
  • Posts: 374
  • Thanks: 49
  • Karma: 8
2 years 8 months ago - 2 years 8 months ago #328480 by galanopd
No, actually I want the opposite. As I wrote

Now, how can I show the plan in case field value = one, two and two-plus but not one-plus ?

So I need to show the plans upon field's different selections.

The "Conditions on CB Fields to show plan at registration" is a section inside each plan's configuration and based on this the plan appears.

EDIT: Correction in my description:

Plan Basic has subplans "one" and "two"
Plan Basic+ has subplans "one-plus" and "two-plus"

So when I call a subplan from the field selection, it's parent plan also appears based on its "Conditions on CB Fields to show plan at registration". The issue appears because subplans have similar names and I can't easily use regexp to seperately call them. So my question is, how can I add continuous values and use "= (Is equal to)" value rather than using regexp? For instance it would possibly solve the issue if I could use

Plan Basic - Conditions on CB Fields to show plan at registration
And following CB field = myfield
Condition = =(is equal to)
Value = one, two (how do i seperate the values tried many things but...)

Plan Basic - Conditions on CB Fields to show plan at registration
And following CB field = myfield
Condition = =(is equal to)
Value = one-plus, two-plus (how do i seperate the values tried many things but...)

To sum up, my question is, how can I add continuous values in "Conditions on CB Fields to show plan at registration"?

My first question was not clear because it was incomplete, I hope it is more clear now...
Last edit: 2 years 8 months ago by galanopd.

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

  • galanopd
  • galanopd
  • OFFLINE
  • Posts: 374
  • Thanks: 49
  • Karma: 8
2 years 8 months ago - 2 years 8 months ago #328490 by galanopd
It is solved by using regex correctly

The solution to use the whole string is to set begin and end of the string.
Therefore using ^one$ will not bring up one-plus.

But if you can tell me also how can I add continuous values in "Conditions on CB Fields to show plan at registration"? using Condition = =(is equal to) will be very helpful


Thank you
Last edit: 2 years 8 months ago by galanopd.

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

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
2 years 8 months ago #328495 by krileon

So I need to show the plans upon field's different selections.

I completely misunderstood the topic, sorry. I thought you were trying to use CB Conditional to condition fields based off plan selection. Then yes you're correct you'll need to use the REGEXP operator within CBSubs when editing your plan under the Workflows tab. Example as follows.

Conditions: These conditions must be met on the registration form to show this plan at registration:
And following CB Field: SELECT_FIELD_HERE
Condition: Matches regexp below
Value: /^(value_1|value_2|value_3)$/

That should let the plan display if value 1, 2, or 3 is selected.


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: galanopd

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

  • galanopd
  • galanopd
  • OFFLINE
  • Posts: 374
  • Thanks: 49
  • Karma: 8
2 years 8 months ago #328500 by galanopd
Thank you Kyle,

That is exactly what I was needing!
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum