Problem/Motivation

When attempting to manage layout with custom fields, I would like to display the field labels using the inline option, but using any option other than "hidden" or "visually hidden" results in the label displaying above the field.

Steps to reproduce

Install Commerce Kickstart 3.x. and create customised versions of "physical products" supplied by the templates.
When managing display, select "inline" for field labels, the label will display above.

Or:

1. Install Commerce Kickstart 3.x. demo site with demo products.
2. Edit an existing product, the example I used is "White & Wood Chair"

Only local images are allowed.

Resulting in this:

Only local images are allowed.

Selecting the "above" option has the same result. It is possible to hide the labels again using the settings

Issue fork belgrade-3357294

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

niki v created an issue. See original summary.

docevl’s picture

Anyone working on this issue? I would like to have some elements inline while others above. It does not matter how I set this in the Manage Display settings it will ALWAYS be above.

majmunbog made their first commit to this issue’s fork.

majmunbog’s picture

Status: Active » Needs review

majmunbog’s picture

@docevl I’ve opened up an MR to address this issue. Let me know if it works.

niki v’s picture

Hi @majumbog
I updated to Belgrade 2.1.0 on an older site running Drupal 10 and tested but there was no change.
I then made 2 local installs of the latest Commerce Kickstart: one with the content demo, one without, but I couldn't get the fields to display inline in either instance

majmunbog’s picture

Thanks for testing, @niki v! The issue is currently in review, so the fix isn’t available in the latest release yet. You can test this by cloning git@git.drupal.org:issue/belgrade-3357294.git.

niki v’s picture

Thanks, I got confused. I've tested the new code and it works in both D10 and D11 test versions and makes the field display compact, as desired, the the only issue now is that the field label is now plain text, please see attached screenshots:

Before:
screenshot of product data

After:
Screenshot of new layout of updated theme

majmunbog’s picture

@niki v the code is updated, I've added a utility class to "bold" the labels.

niki v’s picture

Thank you! I tested it on all my local sites and it's working as intended.

majmunbog’s picture

Status: Needs review » Reviewed & tested by the community
docevl’s picture

I can confirm the change worked also now, thank you.

  • majmunbog committed 837bc752 on 2.x
    Issue #3357294: "Inline" option for field labels doesn't work
    
majmunbog’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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