I have a block view formatted as table.

The table has two columns. (left is an image, right are 3 fields)
One of the fields is a simple "link" field (Content: Link).

I was trying to wrap that field in a custom CSS tag ... but when I follow the little writeup herunder, the custom tag ("customtag" in this case) I entered is being omitted and I'm just left with the link-field content.

under Style Settings (for that field):
[x] Customize field HTML
     HTML element 
     [span]  (selected this from dropdown)

     [x] Create a CSS class
     [customtag] (entered this in the text box)

Comments

dawehner’s picture

One thing i would always try to do is to try out the latest dev version first.

Kars-T’s picture

Status: Active » Fixed

Closing this due to long inactivity. Feel free to reopen the issue and provide more information.

Kars-T’s picture

Issue tags: +dvcs11

Adding tag

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

HLopes’s picture

Version: 7.x-3.0-rc1 » 7.x-3.x-dev
Status: Closed (fixed) » Active

Same here, latest dev version of views. Seems to happen with tables only.

HLopes’s picture

Status: Active » Closed (works as designed)

Solution: Use "Customize field HTML" instead of "Customize field and label wrapper HTML"

Explanation: http://drupal.org/node/1122130#comment-4334402

tmsimont’s picture

Status: Closed (works as designed) » Needs review

I'm sorry but I don't see how this is working "as designed." If it is, then the design is poor and should be reviewed.

There is no messaging or explanation provided in the UI that an option provided will do nothing at all. It took me almost an hour to find this thread to understand why this was not working to the expectation created in the views UI.

It would make a lot more sense if the UI-set CSS class were applied to both the TH label and the TD field if this option were used when setting up a table view. If it is not supposed to work that way, and is in fact supposed to do nothing, then why provide that option at all?

At the very least there should be a warning message next to that option that it is "designed" to be ignored for tables...

dawehner’s picture

Status: Needs review » Active

Just update the status to open, as needs review means that there is a patch involved.

becometa’s picture

Issue summary: View changes

Came to the same conclusion as tmsimont.
I was also struggling around it for a long time and saw this topic.

msypes’s picture

This bug is still present:
I have a table-based block with a Delete Link field, among others, in a combined column. I want said link to be wrapped in a DIV with a specified class.
The configuration, I have "Customize field HTML" checked and DIV selected. I also have input a desired CSS class.
The link is wrapped in the DIV as expected but there's no class assigned.

If this bug isn't to be fixed soon, does anyone at least have a decent workaround?

Adam S’s picture

I'm having this problem right now where the javascript for the field customization is not showing. I'm developing with the latest dev of Views.

Adam S’s picture

Status: Active » Closed (works as designed)

Read further. The problem is using jQuery update module with administration pages. Views admin does not work with jQuery 1.10. I set the jQuery update modules setting for adminstration pages to use jQuery 1.7.

tzt20’s picture

Thanks Adam S. Changing the administrative jQuery to 1.7 worked great.

garydance’s picture

I just experienced this problem and I fixed it by enabling the Provide default field wrapper elements option in the Row Style Options page.

nithinkolekar’s picture

Status: Closed (works as designed) » Active

#11,#12#13 are all off topic to real problem.

This issue still present where CSS class is not applied to field element.

reproduce:
Customize field HTML>>Create a CSS class then add required class name.

when views page/block is rendered you can notice no css-class is added to that field

nithinkolekar’s picture

Status: Active » Closed (duplicate)

in favor of #1368436: Customize field HTML css class with multiple fields in a column which has working patch but not committed yet.