Skip to Content Skip to Menu

[#6654] Name field not selectable when creating userlist

  • bascherz
  • bascherz
  • OFFLINE
  • Posts: 228
  • Thanks: 29
  • Karma: 11
7 years 5 months ago - 7 years 5 months ago #294396 by bascherz
I fully understand why this happens, but in my opinion the implementation of this should be reconsidered. Please hear me out.

I want my users to keep their First and Last Names separate, both at registration and in their profiles. This allows me to sort data exported from my comprofiler_users table based on last name, which I do using other tools that directly query the database. So I have CB configured with Name Style set to First and Last Name Fields. This forces the system field "name" to not be published, which is what makes it unavailable as a field when creating a userlist. I think name should be available for userlists regardless whether it is published. A userlist is not an input form, which is mainly why I believe this CB configuration option exists in the first place. When I build a userlist, I don't want to have to put the user's first and last names in different columns or one below the other. I want their full name displayed.

As a workaround, I successfully got my desired result by creating the userlist using the lastname field, then editing the comprofiler_lists table directly and simply changing the field ID in the applicable list to that of the name field. This proves that name is a viable field even if unpublished. The problem is, if I ever change ANYTHING about that userlist, I either have to redo this step, or do all my editing directly in the comprofiler_lists table.

Please consider making the name field an always-available field for userlists.

Thanks!

Bruce S - Vienna, VA
Last edit: 7 years 5 months ago by krileon. Reason: Added [#6654] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
7 years 5 months ago #294400 by krileon

When I build a userlist, I don't want to have to put the user's first and last names in different columns or one below the other. I want their full name displayed.

That's the entire point of the format name field. You can also use a Custom HTML field and substitute in the name fields to display however you want. You can even override how the first and last name fields display using their layout parameters. An unpublished field should not be visible on the userlist and if is the case you've found a bug that needs to be fixed and have added bug ticket to fix.

forge.joomlapolis.com/issues/6654


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.

  • bascherz
  • bascherz
  • OFFLINE
  • Posts: 228
  • Thanks: 29
  • Karma: 11
7 years 5 months ago #294404 by bascherz
My point is that the format name field is not available to add to a userlist if the Name Style is set in CB configuration to "First and Last Names". This is because the format name field is only published if you set Name Style to "Single Name Field", which is not what I want.

I don't see any Custom HTML option for userlist columns. Had that been available, I would likely have chosen it instead of hacking the database to get the result I want. Because Custom HTML (in this case) would involve multiple fields (firstname, lastname), I'd expect it to be selectable from the field names list. But it isn't there.

Thanks,
Bruce

Bruce S - Vienna, VA

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
7 years 5 months ago #294407 by krileon

My point is that the format name field is not available to add to a userlist if the Name Style is set in CB configuration to "First and Last Names". This is because the format name field is only published if you set Name Style to "Single Name Field", which is not what I want.

The "formatname" field is always available and it doesn't care what the name style is set to. This is separate from the "name" field.

I don't see any Custom HTML option for userlist columns. Had that been available, I would likely have chosen it instead of hacking the database to get the result I want. Because Custom HTML (in this case) would involve multiple fields (firstname, lastname), I'd expect it to be selectable from the field names list. But it isn't there.

You can have to create the Custom HTML field in CB > Field Management first. Then substitute in first and last name. See the below substitution tutorial for substitution usage information, but you shouldn't need to do this as the formatname field should be sufficient.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18353-using-substitutions-throughout-cb


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.

  • bascherz
  • bascherz
  • OFFLINE
  • Posts: 228
  • Thanks: 29
  • Karma: 11
7 years 5 months ago #294409 by bascherz

The "formatname" field is always available and it doesn't care what the name style is set to. This is separate from the "name" field.


No it isn't, even though it is showing as published.

You can have to create the Custom HTML field in CB > Field Management first. Then substitute in first and last name. See the below substitution tutorial for substitution usage information, but you shouldn't need to do this as the formatname field should be sufficient.


I tried creating a Custom HTML field, which I named cb_fullname. Verified it correctly displays the full name of the user via "[firstname] [lastname" by temporarily including it in one of my profile tabs. Published it. Put it into a tab I don't use. But as you can see in the attached image, that field is also not available to use in a list column.

I am using Joomla 3.7.2 with CB 2.1.2+build.2017.05.04.16.30.55.c67734e1f

Thanks,
Bruce

Bruce S - Vienna, VA
Attachments:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
7 years 5 months ago #294433 by krileon
A field must be published and set to display on profile for it to be available for use in a userlist column. In addition to this its tab must also be published, but the tab can be in a not shown on profile tab position. Ensure this is the case for "formatname" in CB > Field Management and/or your Custom HTML field.


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.

Moderators: beatnantkrileon
Powered by Kunena Forum