Steps to reproduce:

  1. Create a content type with a CCK simple text field. Under Text processing, select "Filtered text (user selects input format)".
  2. Create a node with information in that field. View it: All's well, with the label in its default position above the field.
  3. Go to the Display Fields screen (/admin/content/node-type/[content-name]/display). Change the Label popup to "Inline".
  4. Go back and view the node again. The label is still above the field.

An IM chat with stephthegeek suggested that this might be difficult to solve. To quote:

When you go to the filtered html type, it throws paragraph tags around text, rather than no tags. You'd need to do a display:inline on the following tag as well, which could get a little complicated. The thing is that you could have additional input filters there and there are input filters like... video embedding, glossaries.. etc., so i'm not sure there's a feasible way to work that. It's an interesting one, though.

If this can't be solved, perhaps that popup selection should be removed or annotated if the field is anything other than plain text? Right now, the user is told that something will work, but it doesn't.

Good luck!

Comments

dalehgeist’s picture

I could really, really use a patch or snippet for this right about now. Any workarounds, etc. would be welcomed with open arms.

andrewmacpherson’s picture

Here's a basic work-around for general purpose use, where the textfield only contains inline markup such as <a>, <em>, <cite>, etc.

Add the following to your theme's main stylesheet (usually style.css):

.field-type-text div.field-label-inline + p,
.field-type-text div.field-label-inline-first + p
  { display:inline; }

This will make the first <p> paragraph element following the label appear inline. (That's all it does though. If you have more than one paragraph in your filtered text field, that will still have the default display:block. If you've allowed block-level elements such as <h3> in your input format, these will also retain the usual block formatting.)

Keep in mind stephthegeeks opinion, though... Your mileage may vary.

bcobin’s picture

Thank you - this was very helpful!

millions’s picture

subscribe