[SOLVED] Regexp

12 years 4 months ago - 12 years 4 months ago #185749 by Enigmabcn
[SOLVED] Regexp was created by Enigmabcn
Hi!

I'm using:
Field conditional self
Operator: Is REGEX
Value: (value1|value2|value3|value4)
Mode: Show

The problem I have is that it works always, even when value = value5

Any suggestion?
Thanks!

Please Log in to join the conversation.

12 years 4 months ago #185813 by krileon
Replied by krileon on topic Re: Regexp
Your REGEX delimiter is incorrect. Please try the below.

/value1|value2|value3|value4/


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 to join the conversation.

12 years 4 months ago - 12 years 4 months ago #185839 by Enigmabcn
Replied by Enigmabcn on topic Re: Regexp
Thank you for your help... but it still doesn't work :(

The intention is to show or not a field depending if the user is He or She or They
I put:

/_UE_BASIC_PROFILE_MAN|_UE_BASIC_PROFILE_COUPLE/

When the user is a man it works, but when the user is a Woman (_UE_BASIC_PROFILE_WOMAN) it shows the field as well. I tried many combinations without success, I don't know if the problem is that I simply don't know how to use REGEX or that there is a bug and CB doesn't interpret it well.

Is there a way to see the resultant query? Maybe seeing this it would be much easier to get to the wright Regex.

Thanks!

Please Log in to join the conversation.

12 years 4 months ago #185842 by krileon
Replied by krileon on topic Re: Regexp
Joomla version? CB version? CB Conditional version? Please ensure all 3 are up to date. Please review browser error console while attempting to use the conditional field to see if there is a fatal JS error. A better solution is to use the below condition.

Field conditional self
Operator: Does Not Contain
Value: _UE_BASIC_PROFILE_WOMAN
Mode: Show

The above uses a different method then REGEX being less complicated. As you want the field to show 2 other values when not Woman then is best to just show it if the field isn't Woman.


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 to join the conversation.

12 years 4 months ago #185858 by Enigmabcn
Replied by Enigmabcn on topic Re: Regexp
Joomla Version 1.7.3
CB Version 1.7.1
CB Conditional 1.2.0

For one of the cases your solution could work, but it is more complex than I wrote, that's why I'm trying Regex to work...

Thank you!

Please Log in to join the conversation.

12 years 4 months ago #185919 by krileon
Replied by krileon on topic Re: Regexp
All my tests show it working fine, please PM backend super user login credentials and will take a look. Please include specifically what fields you're trying to apply a condition to so I do not have to hunt them down in Field Management.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.296 seconds