Questions tagged [lightning-inputfield]

A lightning:input component creates an HTML input element. This component supports HTML5 input types, including checkbox, date and datetime-local, email, file, password, search, tel, url, number, radio, toggle. The default is text.

Filter by
Sorted by
Tagged with
0
votes
2answers
437 views

Eye icon inside input password to show password

I'm very newbie in salesforce. I have some task to show eyeicon in form input password to show password Is that possible to create Eye icon in input type password instead using lightning:input or ...
1
vote
2answers
144 views

when required fields are missing in lightning-record-edit-form

When required fields are missing in lightning-record-edit-form does it call any javascript method when clicked on submit button? I checked 'onsubmit' and 'onerror' it didn't call either of them. How ...
0
votes
1answer
22 views

How can we add placeholder for lightning:InputField?

standard html or lightning input has a attribute "placehodler" that allows us to enter a place holder value for the input field, but lightning:inputField does not have that attribute ...
0
votes
1answer
2k views

record:editform for input lookup field pop up search option is not working

I have created a a lightning component record edit form in VF, which has a input lookup field for custom object named Heading. In the lightning component when I search for a Heading name, it will ...
2
votes
1answer
566 views

LWC: How do we attach an onfocus event to an input-field

I'm trying to replicate a very simple functionality of copying a value in a lightning-input-field from another field onfocus. Visualize something of a grid, where I would like to be able to Copy ...
3
votes
2answers
2k views

How to programmatically submit a lightning-record-edit-form?

The lightning-record-edit-form has a documented submit method that I assume can produce similar behavior to a click on a nested submit button. But I can't find any examples of this. The documentation ...
0
votes
1answer
721 views

Get text value from <lightning:inputField> not working properly

I would like to get the value from lightning:inputField. I want to be able to get the length of the string and ultimately create a keyup event for character length validation. However, I can't ...
4
votes
1answer
731 views

recordEditForm with inputField on lookup does not work properly when searching or creating a record

Is it just me or is this an error in the salesforce standard lightning components? Here is what happened up until now: I want to create a new record with lightning:recordEditForm. This record has a ...
0
votes
1answer
24 views

Display lightning-icon in lightning-input and add onclick action

I'm trying to add icon inside input and that's fine, but when i try to add some action like onclick it doesn't work. On front when i try to click on the icon i can not do this, cuz input hover it ;/ &...
0
votes
0answers
31 views

LWC lightnig input type date max value dynamically

LWC lightnig input type date max value dynamically I'm trying to add max Date as 2 years from now. Getting the error ass add_years is not defined Any suggestion would be great.. Html: <lightning-...
0
votes
1answer
2k views

Onchange Function for Lightning:inputField Automatically Runs (Causing an Error) when Loaded in a Modal

I have a component that opens in a modal. Modal/Button Markup <lightning:overlayLibrary aura:id="overlayLib"/> <lightning:button name="modal" label="Create Pet" onclick="{!c.handleShowModal}...
0
votes
2answers
3k views

How to put asterisk in lightning-input-field - LWC

My requirement is to put an asterisk before a lightning-input-field in my LWC. So I tried below code :- Earlier :- <lightning-input-field field-name='AccountId'></lightning-input-field> ...
0
votes
1answer
72 views

Hiding dates earlier than today on lightning-input field

Is there way to grey out the dates which are less than today using a simple <lightning-input type="date" name="input1" label="Enter a date" ></lightning-input>...
0
votes
2answers
1k views

lightning-input-field Error in $A.getCallback() [t.checkValidity is not a function]

I have a requirement to build a custom layout in LWC, and for that I am using lighting-record-edit-form and lightning-input-field with the required attribute. When the user tries to submit the form ...
0
votes
0answers
47 views

Style lightning-input like lightning-input-field

I'm using lightning-inputs in the middle of my record-edit-form to provide greater flexibility. Unfortunately their styling is different than that of the lightning-input-field which means they are not ...
1
vote
0answers
129 views

Clearing validation errors on clicking clear filters icon not working on LWC lightning-input

The validation errors are cleared only on the second click of the button. But i need this to be working on the first click. Kindly help. My current code is as follows : HTML CODE : <div class="...
17
votes
3answers
19k views

How to submit a lightning:recordEditForm from a button that isn't nested?

The lightning:recordEditForm documentation provides this example: <aura:component> <lightning:recordEditForm recordId="003XXXXXXXXXXXXXXX" objectApiName="Contact"> <...
0
votes
1answer
32 views

lightning:input field not passing value?

I've built a form in my lightning component and it seems to be working perfectly, except for a single lightning:select field not passing thru. If I check the box in the form, it doesn't reflect that ...
5
votes
1answer
201 views

Is it possible to set # of visible lines on a multi-picklist field with lightning-input-field in LWC

While using lightning-input-field within a lightning-record-edit-form in a LWC, I noticed that multi-picklist fields don't respect their default visible lines setting. It always seems to show 4. I've ...
0
votes
0answers
22 views

switching from force:input to lightning:input causing styling and functionality errors

switching from force:input to lighting:input and have run into a few errors. first, my styling is off and I'm not sure why. here's my code for these sections- <div class="slds-grid"> ...
1
vote
1answer
497 views

Why is <lightning-input-field> not setting value of checkboxes in LWC?

I am getting data in my LWC from a wrapper class. In that data, I get object API name, field API name and value present in the field in the form of Strings. I iterate over the data from the wrapper ...
0
votes
1answer
366 views

How to remove help text of lightning-input-field in LWC

I have inserted LWC on VF page using lightning out. In my LWC, I have used lightning-input-field. The help text on the label is not displaying properly. I am guessing that it's because of lightning ...
6
votes
2answers
1k views

variant='label-hidden' Not Working for lightning-input-field When field is a Lookup

I have a Lightning Web Component and in that I'm using a lighting-record-edit-form. I'm trying to use a custom label for an input by hiding the default one for the lightning-input-field and adding my ...
0
votes
0answers
104 views

Lightning Input-field Currency Decimal Places

I am using a lightning-input-field in an LWC in a lightning-record-edit-form, I have set the custom Currency field (Currency Options: Length: 14, Decimals: 4). When the field renders it has 2-decimal ...
0
votes
0answers
21 views

<lightning-input> in Salesforce LWC page not displaying expected result in Lightning UI [duplicate]

I have a Salesforce LWC page with currency symbol dropdown list and a text field. Whole idea is that whenever user leaves the text input field (onblur), text field will be formatted to a currency ...
0
votes
0answers
49 views

Backspace key is not working for lightning-input type=“date” field in service console

We have created lightning web component and embedded to visualforce page using lightning-out, this VF page we are using in service console app. If we preview VF page other than console app, then ...
1
vote
1answer
390 views

How to pass lightning-input-field value as a parameter to controller class method in Lightning Web Component

Requirements: I am building a Custom Mass Transfer Records functionality where Based on Object Name and Owner, I want to display List of Sobject Records owned by user. Once List is displayed, I want ...
0
votes
3answers
1k views

Focusing on an input Field when using <lightning:inputField>

I am using lightning:recordEditForm to display to users custom creation form and using lightning:inputField. However, I am unable to set focus on a particular field. I know that Salesforce doesn't ...
0
votes
0answers
83 views

Get Drop down and Enter input freely in a single line - Lightning component

I have an input dropdown in a table shown below. Please check below code I used for this input dropdown. <td role="gridcell"> <div> <select class="selectEle" id="{!'...
1
vote
2answers
437 views

how to display the label on right side of checkbox using <lightning-input-field>

As I am using <lightning-record-edit-form> & inside it I used <lightning-input-field>. My requirement is like If the input field is of checkbox then I want to display the checkbox ...
4
votes
2answers
11k views

How to do field validation on lightning:recordEditForm with lightning:inputField

Background I have a lightning component with a lightning:recordEditForm for creating new Opportunity records. The lightning:recordEditForm contains many lightning:inputField 's I would like to ...
2
votes
1answer
320 views

LWC - Bypass Field-Level Security using Lightning-Input-Field?

Is it possible to create an LWC input form that bypasses field-level security, while still leveraging the powerful UI brought by <lightning-input-field>? Im creating a generic filter component ...
1
vote
0answers
132 views

lightning-record-edit-form rich text field issue

When we pass value from <lightning:textarea> (Aura Component) to LWC's <lightning-input-field field-name={fieldNameWhichisRichTextField}>. If i send any value that starts with symbol '<'...
2
votes
1answer
5k views

How to use Lookup Field in LWC

I have a custom LWC Page which is used as Public site. On this lwc, I have a form to populate data in contact object. I have one custom object called school this is the look up filter field in ...
0
votes
0answers
29 views

Why time Aura input doesnt display values as expected?

Im using lightning inputs for web compononent and for aura lightning LWC: <lightning-input data-formfield="Open1" type="time" variant="label-hidden" value={mondayOpenTime} disabled={mondayOpen}...
1
vote
1answer
282 views

<lightning-input-field> not rendering when wrapped in child component

So I am trying to dynamically render out the fields of a Salesforce account, since this is supposed to be a package and I do not know what fields and rules the organization has on an account. However, ...
0
votes
1answer
47 views

Can't validate the first value from lightning:InputField using as picklist

Resume of scenario: Whether a user does not select any value from the picklist the field should throw an error message. <lightning:recordEditForm aura:id="raiseIssueForm" ...
1
vote
2answers
231 views

Different behavior for value attribute in lightning:inputField for lookup field

I have a requirement where user needs to create a new Opportunity record in a lightning popup.Here I have to display a Territory field which is a lookup .So I am using lightning:inputField tag for ...
2
votes
1answer
2k views

lightning:inputfield - lookup fields in Lightning Experience, Salesforce Mobile App and Lightning Out

I’ve been experimenting with the new lightning:inputfield and it seems that the lookup fields don’t work in the mobile app or in Lightning Components which have been embedded in VF pages. Can people ...
0
votes
1answer
95 views

How to remove trailing zeros from lightning input LWC?

I read through the documentation but didn't find an answer, I tried to use the lightning-formatted-number element, but it's only used for display and can't be edited as far as I can tell. expected: ...
1
vote
0answers
717 views

LWC lightning-input-field Remains Disabled when Rerendered Using Another field-name

Problem: A dynamic lightning-input-field remains "disabled" after having been a formula field, even if it is no longer pointing at a disabled field. It's possible to workaround this by hiding the ...
2
votes
1answer
467 views

Does lightning-input-field automatically respect field level security (FLS) from profile/permission sets?

A strength of Visualforce's apex:inputField is that it automatically respects the view/edit permissions that come from the profile/permission sets for both the object and the fields. I'm assuming ...
1
vote
1answer
271 views

lightning-input: what is the purpose of message-when-too-long?

The lightning-input component has a documented property, message-when-too-long, which is described as: "Error message to be displayed when the value is too long." in the documentation. Presumably, ...
0
votes
1answer
444 views

Lightning input Field Lookup Drop-down

I have a Table and in each row lookup lightning input field , the problem is that the drop-dawn on the field are not over the next row so I cannot this it how it is : How it is suppose to be : I see ...
1
vote
2answers
3k views

Lightning component focus on lightning:inputField

I have a <lightning:inputField aura:id="inputField1"> in a modal window, and I want to focus on this field when the modal opens, so that the user doesn't have to use their mouse or tab to set ...
0
votes
1answer
83 views

lighnting:input field value passed to apex varies depending on user's locale setting

I have an aura component with an input field of type number: <aura:attribute access="private" name="objs" type="List" /> <table class="slds-table slds-table_bordered slds-table_cell-...
2
votes
2answers
3k views

lightning:recordEditForm | Some input fields not being displayed

I'm trying to create a new form for a custom Object in salesforce. This is my form Code: <lightning:recordEditForm aura:id="MyFormId" objectApiName="...
0
votes
2answers
701 views

default lightning:inputField dependent picklist

In Visualforce/Standard Salesforce UI, if you have a required dependent picklist with only one value, it will default the field to that value and not allow the user to change the value. Is there any ...
3
votes
1answer
198 views

Displying Salutation field using lightning:recordEditForm on Person Account

There is a known uncommon behavior with Salutation field on Contact object while displaying it using lightning:recordEditForm. Since it is a part of the compound Name field on Contact. The workaround ...
0
votes
3answers
2k views

Using lightning:inputField, I want to remove helptext

I'm using lightning:input-field in LWC, but I want only the input field, nothing else. I have hide the label using variant="label-hidden", but I automatically get the help-text near the field. And I ...