Seems like attribute doesn't work anymore.
I know before label-hidden variant, I used to be able to hide labels using some CSS. Unsure what it was anymore.
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communitySeems like attribute doesn't work anymore.
I know before label-hidden variant, I used to be able to hide labels using some CSS. Unsure what it was anymore.
I solved the issue with adding this css:
.THIS .slds-form-element__label {
display: none !important;
}
Maybe it can help you!
Wrote couple of these selectors that if anyone knows how to simplify - definetely let me know. Seems super fragile and ugly at least (dunno why comma separation didn't work here; ultimately I'd like to select any label
in the hierarchy, not just immediate child).
Here's the CSS:
.THIS .inputField-label-hidden > * > label {
display: none !important;
}
.THIS .inputField-label-hidden > * > * > label {
display: none !important;
}
.THIS .inputField-label-hidden > * > * > * > label {
display: none !important;
}
.THIS .inputField-label-hidden > * > * > * > * > label {
display: none !important;
}
Use:
<lightning:inputField
class="inputField-label-hidden"
fieldName="Something__c"/>