0

I have four text fields in my Content Type:

First Name Middle Name Last/Business Name (required) Generation

I want to combine these into one column in my view. I want the display format to be: LastName, FirstName MiddleName Generation

So only the last name is followed by a comma. The first name and middle name and generation only have spaces between them. I go to the Drupal view table settings and set the "Column" for all four fields to "Last/Business Name." But here's where I'm stuck: I know that there is a "Separator" field, but if I set it to a comma the format will be LastName, FirstName, MiddleName, Generation and that's not what I want.

1 Answer 1

1

TL;DR: Add the four fields, hide them from the view. Add a custom text field, use it to custom-render the earlier four.

What you need to do is add the four fields into your view. For each, click and check the Exclude From View setting. Then add a fifth field, a Custom Text field, and arrange it so that it comes after the four fields earlier. Click on it to edit, and configure it to output the fields earlier using token replacements.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.