Skip to Content Skip to Menu

Fields layout within CB Tab

  • azjr
  • azjr
  • OFFLINE
  • Posts: 102
  • Thanks: 10
  • Karma: 2
8 years 2 weeks ago #281401 by azjr
Replied by azjr on topic Fields layout within CB Tab
Thanks Kyle!
Is there "if else" option? like [cb:ifelse]?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 68629
  • Thanks: 9110
  • Karma: 1434
8 years 2 weeks ago #281418 by krileon
Replied by krileon on topic Fields layout within CB Tab
There's an "or" usage. See the bottom of the substitution tutorial below.

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

Example usages of cb:if are provided there including "or" usage.


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.

  • azjr
  • azjr
  • OFFLINE
  • Posts: 102
  • Thanks: 10
  • Karma: 2
8 years 2 weeks ago #281428 by azjr
Replied by azjr on topic Fields layout within CB Tab
hmmm... or is inclusive - I'm thinking of this type of logic:

[cb:if cb_progress_account!="100"]complete your account! [ "OTHERWISE" "or else": ]"your account is not completed"[/cb:if]

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 68629
  • Thanks: 9110
  • Karma: 1434
8 years 2 weeks ago #281430 by krileon
Replied by krileon on topic Fields layout within CB Tab
There's no elseif usage. You'd need to do the below.

[cb:if cb_progress_account="100"]COMPLETE[/cb:if]
[cb:if cb_progress_account!="100"]INCOMPLETE[/cb:if]


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

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

  • azjr
  • azjr
  • OFFLINE
  • Posts: 102
  • Thanks: 10
  • Karma: 2
8 years 2 weeks ago #281437 by azjr
Replied by azjr on topic Fields layout within CB Tab
Thanks Kyle - I have few more questions:

1. what's the format to call for empty field? => cb:if cb_phone="" ? (meaning there is no value entered?)

2. How do I display editable field (i.e. checkbox) IN view=userprofile? additionally or instead of showing editable field in edit view - i.e. I want to build progress steps, and user should be able to check the checkbox upon completion of a task - except I don't want to direct user to the edit view but do that right in the tab (I'm using custom HTML as wrapper for the fields btw.)

3. Following this thought: I created a 'shell' tab with the fields - is there "no position" position for tabs? so that I don't have to display the tab - but instead call it into the custom html output field? I tried to unpublish the tab (no go) and to use [cb:usertab tab="22" user="#displayedOrMe" /] ... no go either

4. BTW - on the Using Substitutions throughout CB - I don't understand couple things - and I can't find answer that will clarify:
a) what exactly these both mean: #displayed and #displayedOrMe
b) what is this: reason - fields and tabs only ('profile', 'register', 'list', 'edit', 'search') => I tried to use reason="edit" thinking that the editable field will show up in view...
c) what the heck are these: not_on_profile_1-9?

thanks!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 68629
  • Thanks: 9110
  • Karma: 1434
8 years 2 weeks ago #281456 by krileon
Replied by krileon on topic Fields layout within CB Tab

1. what's the format to call for empty field? => cb:if cb_phone="" ? (meaning there is no value entered?)

Yes, matching against "" is to match against empty string.

2. How do I display editable field (i.e. checkbox) IN view=userprofile? additionally or instead of showing editable field in edit view - i.e. I want to build progress steps, and user should be able to check the checkbox upon completion of a task - except I don't want to direct user to the edit view but do that right in the tab (I'm using custom HTML as wrapper for the fields btw.)

CB Core Fields Ajax will allow you to have ajax editable fields. Thee can be edited from profile view or userlist for example.

3. Following this thought: I created a 'shell' tab with the fields - is there "no position" position for tabs? so that I don't have to display the tab - but instead call it into the custom html output field? I tried to unpublish the tab (no go) and to use [cb:usertab tab="22" user="#displayedOrMe" /] ... no go either

Set your tab to one of the not displayed on profile positions.

a) what exactly these both mean: #displayed and #displayedOrMe

user="#displayed" means substitute information from the displayed user. This only works on profile view as we only set the displayed value there. #displayedOrMe means substitute from the displayed user otherwise substitute from me (the viewing user).

b) what is this: reason - fields and tabs only ('profile', 'register', 'list', 'edit', 'search') => I tried to use reason="edit" thinking that the editable field will show up in view...

It's the reason for the output. If the reason is "profile" (default) it means the profile display of the field. If the reason is "edit" it's the profile edit display of the field.

c) what the heck are these: not_on_profile_1-9?

They're tab positions to hide tabs from being output on profile. These can be used to have API or substitution accessible only tabs/fields.


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

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

Moderators: beatnantkrileon
Powered by Kunena Forum

Facebook Twitter LinkedIn