HELP REQUIRED - HOW TO USE CB CONDITIONAL?

12 years 2 months ago #193778 by cherylru85
Replied by cherylru85 on topic Re: HELP REQUIRED - HOW TO USE CB CONDITIONAL?
Thanks Krileon.
But the values of the radio buttons, are a string of text. So if I set is REGEX, this error would appear.

Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in /home/intelli/public_html/sccademo/components/com_comprofiler/plugin/user/plug_cbconditional/cbconditional.class.php on line 470

Does this mean it would be impossible to condition the field against 2 values found in another field?!

I really appreciate the responses/assistance I am getting through the forum.

Please Log in to join the conversation.

12 years 2 months ago #193835 by krileon
Did you include the delimiter in your REGEX? Example /value1|value2/ the leading and trailing / are delimiters for the 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.

Please Log in to join the conversation.

12 years 1 month ago #193957 by cherylru85
Replied by cherylru85 on topic Re: HELP REQUIRED - HOW TO USE CB CONDITIONAL?
Nope.
I still can't seem to get it right.

Here what works and what doesn't.

WORKS:
Text area box, with Conditional Setting 1 -
Field Conditional Self: If Field "I qualify for Associate Membership / I wish to be considered for Associate Membership because I am :" Is Does Contain "/A practising lawyer who is a company secretary or seconded to corporations or other organisations as corporate or in-house legal counsel.[NOTE: An application under this limb is subject to the Committee’s determination that you can contribute to" (first option for conditional text area) Then Show.

WHAT DOESN'T WORK
Text area box with 2nd Conditional Setting -
Field Conditional Self: If Field "I qualify for Associate Membership / I wish to be considered for Associate Membership because I am :" Is Does Contain "An alumni member of the Association. [NOTE: An application under this limb is subject to the Committee’s determination that you can contribute to the work of SCCA.]/" (second option for conditional text area) Then Show.

The text area box would appear if 2 conditions are set. If it is only one, then it would be able to hide or show.

These 2 options would have to trigger the text area to appear if they are being selected.
If 2 conditions cannot be set to trigger a next field, what would be the alternative? Quite impractical to create a 2nd text area for a similar declaration. I would then have too many columns in the exported spreadsheet.

Kindly advise. Thank you very much!

Please Log in to join the conversation.

12 years 1 month ago - 12 years 1 month ago #194062 by krileon
You shouldn't condition the same field twice. Again, it works in an OR scenario. This means if Condition 1 does not match and it's set to Show then it will Hide if the condition is not met. Next Condition 2 fires and if it's set to Show and the condition is not met then it will Hide. So if Condition 1 passed, but Condition 2 didn't then your field is hidden. The display (show, hide, required, non-required, etc..) always does the opposite if the condition is not met. With that in mind please adjust as necessary. Ideally in your situation you should use REGEX to match your textarea field using | to separate the 2 values so you're only using 1 Condition. REGEX value as follows.

/A practising lawyer who is a company secretary or seconded to corporations or other organisations as corporate or in-house legal counsel\.\[NOTE: An application under this limb is subject to the Committee’s determination that you can contribute to|An alumni member of the Association\. \[NOTE: An application under this limb is subject to the Committee’s determination that you can contribute to the work of SCCA\.\]/

I suggest maybe using a checkbox field or something of the sort to better match as you're matching a very select amount of text in a textarea field, which a user can provide whatever they want.


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.228 seconds

Facebook Twitter LinkedIn