You need to sign in to do that
Don't have an account?
Julien Salenson
Using lightning:inputField, I want to remove helptext
Hi,
I'm using lightning:inputField, but I want only the input field, nothing else.
I have hidde the label, but I automaticaly get the helptext near the field.
And I don't want it in my component.
My code is :
<lightning:inputField fieldName="myCustomField__c" variant="label-hidden" "/>
Any Idea ?
I'm using lightning:inputField, but I want only the input field, nothing else.
I have hidde the label, but I automaticaly get the helptext near the field.
And I don't want it in my component.
My code is :
<lightning:inputField fieldName="myCustomField__c" variant="label-hidden" "/>
Any Idea ?
There are two way you can do this:
1. Go to the particular object's field ("myCustomField__c") in in your Org and remove the HelpText value given there. It go out from the Lightning page.
2. Or you inspect the particular help icon area on page and find the some unique class of help icon. And add in this way to your Lightnong STYLE:
.THIS .slds-form-element{ /* Replace this class name "slds-form-element" by your finding. */
display: none;
}
Thanks
Niraj
All Answers
Hi Julien,
If the Help Text is displaying in your Lightning page then Help Text exists in the Custom Field.
If you edit the Custom Field in the object you are using and delete the HelpText, it will go away from the Lightning Page as well.
Best of Luck.
There are two way you can do this:
1. Go to the particular object's field ("myCustomField__c") in in your Org and remove the HelpText value given there. It go out from the Lightning page.
2. Or you inspect the particular help icon area on page and find the some unique class of help icon. And add in this way to your Lightnong STYLE:
.THIS .slds-form-element{ /* Replace this class name "slds-form-element" by your finding. */
display: none;
}
Thanks
Niraj
Great : It's working now !
I have made this style:
.THIS .slds-form-element__label{
display: none;
}
.THIS .slds-button__icon{
display: none;
}
Thank you for your help.
This CSS is not working for me. I added this in the CSS file created inside the LWC folder. Did you makeany other change apart from the one mentioned above?
LWC is enforcing the shadow DOM style scoping, so you can't currently style other Elements outside your shadow tree.
The below worked for me in an Aura component css file, to hide the default help text and have only the field label :
.THIS .slds-form-element__icon{
display: none;
}
.THIS .slds-button__icon{
display: none;
}