Display two fields on one row in CB User List

14 years 1 month ago #125782 by palmqviststefan
Display two fields on one row in CB User List was created by palmqviststefan
Hi,

I would like to display two fields next to each other in one column of a CB user list. More specifically, I would like to show the user's adress on one line in column 2, and the zip code and city on the second row of column 2.

What I have right now is that the adress, zip code, and city are being displayed on one row each of column 2, but that tends to give me a very long user list. The list also doesn't look that well, since in column 1 I only have the user's full name being displayed on one row.

When I look in jos_comprofiler_lists I can see that the field col2fields contains the following: 40|*|35|*|36, where the numbers correspond to the IDs of the fields I have selected to be displayed.

I assume that |*| is the code for vertical concatenation. Is it possible to change this so that fields 35 and 36 are horisontally concatenated?

Any help is appreciated.

(CB 1.2.1, Joomla 1.5.15)

Post edited by: palmqviststefan, at: 2010/03/03 12:26

Please Log in to join the conversation.

14 years 1 month ago #125790 by palmqviststefan
Replied by palmqviststefan on topic Re:Display two fields on one row in CB User List
Hi again,

after typing my post I searched for "concatenate" and found that I could achieve what I wanted with the use of a delimiter field.

My apologies for not reading carefully enough. English is not my maiden language and I didn't think of the word "concatenate" before typing my own post.

Now that I think that my issue is solved, I can't really see how I delete my own post.

Please Log in to join the conversation.

14 years 1 month ago #125792 by nant

Please Log in to join the conversation.

14 years 1 month ago #126330 by palmqviststefan
Replied by palmqviststefan on topic Re:Display two fields on one row in CB User List
OK,

so I was able to concatenate "zipcode" and "city" so it displays on one row in a CB user list, by using a delimiter field, where I put "[zipcode] [city]" in the description. I call this new field "postal_address" and can display it on one row in a user list. So far, so good.

I am using CB Privacy, since I want to let the user decide whether the contact info ("address" and "postal_adress") should be visible or invisible to other users.

I managed (with some help from Nick) to achieve what I want when it comes to the user's address. I just applied the relevant privacy settings to the textfield "address". But I am not able to apply privacy settings to the delimiter field "postal_address".

Is it possible to apply privacy settings to a field that is of the type Fields Delimiter? When I try, the info in "postal_address" is still being displayed in the user list. When I look in the database, there is no real field titled "postal_address", so maybe that is why I cannot apply privacy settings to it?

If it is not possible to apply privacy settings to a delimiter field, is there any other way for me to display "city" and "zipcode" on one row in a user list, while still being able to have the user decide if the contents of "city" and "zipcode" are publicly visible?

Post edited by: palmqviststefan, at: 2010/03/09 13:07

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.211 seconds

Facebook Twitter LinkedIn