Skip to Content Skip to Menu

[SOLVED] Append CB Fields to Formatted Name

  • mhs_cb
  • mhs_cb
  • OFFLINE
  • Posts: 53
  • Thanks: 0
  • Karma: 0
10 years 1 month ago - 10 years 1 month ago #249089 by mhs_cb
Currently the FormatName is made up of a combination of "Fist Name", "Middle Name" and 'Last Name".

Is there a way to have the FormatName include (have appended to it) other CB custom fields?

Assuming I want the person full name, followed by the Company Name (which is a custom CB Field). How do I do this?

Reason being, some third party components can not search or use custom CB fields, and only use the format name for their functions. So I either have to hack their component and force it to use CB fields, which i'd rather not do, or reformat the FormatName.
Last edit: 10 years 1 month ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8283
  • Karma: 1443
10 years 1 month ago #249100 by krileon
Replied by krileon on topic Append CB Fields to Formatted Name
With CB 2.0 this is easily done with the new layouts feature. With CB 1.x you'll need to use a delimiter field and substitute in both your field and the formatname field. Example as follows.

[cb_prefix][fortmatname][cb_suffix]

I'm not sure how adjust the field output is going to matter for your 3rd party extensions if they're not using CB fields though. The only way for what you're wanting to work is to modify the name column in _users and store the prefix with the name.


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.

  • mhs_cb
  • mhs_cb
  • OFFLINE
  • Posts: 53
  • Thanks: 0
  • Karma: 0
10 years 1 month ago #249101 by mhs_cb
Replied by mhs_cb on topic Append CB Fields to Formatted Name
You are right. This won't help, since the third party component can't expect CB substitutions. I'm looking at a different alternative.

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

Moderators: beatnantkrileon
Powered by Kunena Forum