Skip to Content Skip to Menu

Field Title for Profile to be different from Field Title for Registration

  • galanopd
  • galanopd
  • OFFLINE
  • Posts: 374
  • Thanks: 49
  • Karma: 8
2 years 10 months ago - 2 years 9 months ago #327585 by galanopd
Hi,

I have a Custom HTML field that calls a tab. All tab fields appear ok.
Now, within this tab I have various fields e.g. a field type Query Drop Down and I need its title to have different css for profile and different for registration.

I decided to use overrides with something like this but I can't make it work
Code:
<p>[cb:if reason!="edit"]Entity type:[/cb:if][cb:if reason="profile"]<span style="color: #007bff; font-weight: bold;">Entity type</span>[/cb:if]</p>
Last edit: 2 years 9 months ago by krileon. Reason: Added [SOLVED] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48424
  • Thanks: 8274
  • Karma: 1443
2 years 10 months ago - 2 years 10 months ago #327589 by krileon
What about it isn't working? "reason" usage should work fine in field titles. Though reason!="edit" should probably be reason!="profile" otherwise you won't have a title display at all in profile edit.

You can also do this entirely with CSS. First edit the field and add fieldEntityType to CSS Class parameter. Next you can use the following CSS to style the field however you like exclusively on profile.

Code:
.cbProfile .fieldEntityType label { color: #007bff; font-weight: bold; }

You can add custom CSS using CSS overrides shown below.

www.joomlapolis.com/blog/kyle/18711-template-css-overrides-made-easy


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.
Last edit: 2 years 10 months ago by krileon.

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

  • galanopd
  • galanopd
  • OFFLINE
  • Posts: 374
  • Thanks: 49
  • Karma: 8
2 years 9 months ago - 2 years 9 months ago #327592 by galanopd

What about it isn't working? "reason" usage should work fine in field titles. Though reason!="edit" should probably be reason!="profile" otherwise you won't have a title display at all in profile edit.


Using
Code:
[cb:if reason="profile"]<span style="color: #007bff; font-weight: bold;">Entity type</span>[/cb:if]
I have a blue title in profile and no title in the registration form.

Using
Code:
[cb:if reason!="profile"]<span style="color: #007bff; font-weight: bold;">Entity type</span>[/cb:if]
I have no title in profile and a blue title in registration form.

Using
Code:
<p>[cb:if reason!="edit"]Entity type:[/cb:if][cb:if reason="profile"]<span style="color: #007bff; font-weight: bold;">Entity type</span>[/cb:if]</p>
I have this "Entity type:Entity type" in profile and the registration is as expected (no colour).

So after all what I am trying to achieve is to have a blue title in profile and a no coloured one in registration. I have also tried changing "edit" to "registration" but the result is the same.

P.S. Will check the alternative you suggested in a while (Thanks)
Last edit: 2 years 9 months ago by galanopd.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48424
  • Thanks: 8274
  • Karma: 1443
2 years 9 months ago #327595 by krileon
Ok, it's just a matter of fixing your IF condition then. Your reason!="edit" condition should actually be reason!="profile".


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 9 months ago - 2 years 9 months ago #327613 by galanopd
Yes, it worked Kyle,
Code:
[cb:if reason="profile"]<span style="color: #007bff; font-weight: bold;">Entity type</span>[/cb:if][cb:if reason!="profile"]Entity type:[/cb:if]
Thank you
Last edit: 2 years 9 months ago by galanopd.
The following user(s) said Thank You: krileon

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

  • galanopd
  • galanopd
  • OFFLINE
  • Posts: 374
  • Thanks: 49
  • Karma: 8
2 years 9 months ago - 2 years 9 months ago #327632 by galanopd
Any idea why this doesn't change the UserListFieldTitle?
Code:
.cbUserListFieldTitle .fieldType3 label { color: #007bff; font-weight: bold; }

P.S. In inspector when I do something like this
Code:
.cb_template .cbUserListLayoutGrid .cbUserListFieldTitle .fieldType3 { color: #007bff; }

It does change, but when I add it in the CB Template Changer Overrides it doesn't
Last edit: 2 years 9 months ago by galanopd.

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

Moderators: beatnantkrileon
Powered by Kunena Forum