Skip to Content Skip to Menu

Field Type Custom HTML (before known as delimiter)

10 years 11 months ago #272597 by edmundcheong
I have 2 fields which I would like to compare:

cb_1
cb_2

I tried the following:

[cb:if cb_1!=cb_2]No Match[/cb:if]
[cb:if cb_1=cb_2]Match[/cb:if]

No thing is shown.

I tried this:

[cb:if cb_1!="cb_2"]No Match[/cb:if]
[cb:if cb_1="cb_2"]Match[/cb:if]

It shows No Match..

Am I doing correctly?

Do you have any reference documents for this?

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

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
10 years 11 months ago #272608 by nant

edmundcheong wrote: I have 2 fields which I would like to compare:

cb_1
cb_2

I tried the following:

[cb:if cb_1!=cb_2]No Match[/cb:if]
[cb:if cb_1=cb_2]Match[/cb:if]

No thing is shown.

I tried this:

[cb:if cb_1!="cb_2"]No Match[/cb:if]
[cb:if cb_1="cb_2"]Match[/cb:if]

It shows No Match..

Am I doing correctly?

Do you have any reference documents for this?


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

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 50734
  • Thanks: 8696
  • Karma: 1475
10 years 11 months ago #272611 by krileon
There's no substitution IF usage to compare 1 field value to another fields value. For that you'd use something like 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.

10 years 11 months ago #272612 by edmundcheong
Replied by edmundcheong on topic Field Type Custom HTML (before known as delimiter)
Thanks nant..

If read correctly, using another field as a parameter will not work?

Note: All parameters must come after the field (e.g. [cb:userdata field="FIELD_NAME" user="REPLACEMENT" /]) as anything otherwise (e.g. [cb:userdata user="REPLACEMENT" field="FIELD_NAME" /]) will not work.


Or should i bracket the fields like this:

[cb:if cb_1!="[cb_2]"]No Match[/cb:if]

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

10 years 11 months ago #272613 by edmundcheong
Replied by edmundcheong on topic Field Type Custom HTML (before known as delimiter)

krileon wrote: There's no substitution IF usage to compare 1 field value to another fields value. For that you'd use something like CB Conditional.


Got it. Thanks.

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

Moderators: beat, nant, krileon
Powered by Kunena Forum