2022 Developer Survey is open! Take survey.

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
1 answer
25 views

Lightning input type="datetime" not auto-populating values prior to 9am local time

I have a lightning component which has a datetime field, the value of which is auto-initialized with the component's helper.js. The default initialized value is supposed to be today's date and the ...
user avatar
  • 56
0 votes
0 answers
32 views

lightning-input-field with time type not applying gmt offset when saving

I have a lightning-record-edit-form which is rendering a lightning-input-field that happens to be of type Time. The input renders correctly, however when I save the form, the offset from my timezone ...
user avatar
0 votes
0 answers
69 views

What's the difference between the "label-stacked" and "standard" variant of lightning-input?

For the lightning-input component, the variant attribute has 4 variations: "standard", "label-inline", "label-hidden", and "label-stacked". "standard" ...
user avatar
  • 451
1 vote
0 answers
37 views

Lightning record view form suddenly stopped working from past 2 days [closed]

We have made one LWC in which we are using lighting record view form to display the details of the records. Earlier, it was working fine, but from past two days, whenever we are opening the component, ...
user avatar
  • 11
0 votes
2 answers
135 views

LWC: count amount of checkboxes that are currently checked

I am trying to get the amount of checkbox that are currently checked on a change handler. What I have so far: <template for:each={objInfo.todoList} for:item='todoListItem' class="slds-p-...
user avatar
  • 127
0 votes
1 answer
29 views

Formula Field Is Undefined In Aura Component

I am trying to populate some lightning: inputs in an aura component with a few values. In the example below, {!v.enrollmentRecord.Comments__c} works fine but {!v.enrollmentRecord.OPEID__c} is ...
user avatar
0 votes
1 answer
245 views

Regex to validate text field which can contain number and alphabets both

I want to validate an input text field using pattern. I want my field to contain 0-9 a-z A-Z Please help pointing out the error in below code for the same <lightning-input type="text" ...
user avatar
0 votes
0 answers
838 views

LWC Lightning-input-field not showing lookup correctly

I have a LWC where I am using lightning-input-field to display a custom field on custom object which is a look up to other object, it doesn't display correctly. Here's the code : <lightning-layout-...
user avatar
2 votes
0 answers
119 views

Label not being read by screen reader for lightning input field

I'm using a lightning-input-field as a lookup with a custom label. The custom label displays properly and replace the label associated with the field. My issue is that I want the screen reader to read ...
user avatar
  • 25
0 votes
1 answer
31 views

How can I get my search field to align with the other grid items

I have a header component with a sub-component search field. <template> <div class="header-grid"> <div> New Opportunitites </div> ...
user avatar
  • 663
5 votes
1 answer
110 views

How to make a required `lightning-input-field` field not required?

Is it possible to make a <lightning-input-field> where field-name is required (such as Contact.LastName) not required on the UI? I would like the field to not kick in validation rules (client ...
user avatar
  • 4,310
4 votes
2 answers
772 views

Error: Unknown public property "name" of element <LIGHTNING-INPUT-FIELD>. This is likely a typo on the corresponding attribute "name"

I am getting this issue in the console: Error: Unknown public property "name" of element . This is likely a typo on the corresponding attribute "name". However, this component was ...
user avatar
  • 497
0 votes
0 answers
147 views

LWC date input not displaying properly

I am facing a issue with lwc input for date. the date picker dropdown is not displaying properly it is being cutout by windows taskbar. I want to display this date picker at top of the field instead ...
user avatar
0 votes
1 answer
63 views

How to iterate through an array of input fields with the same name and insert the value in an array?

I have a template that iterates through an array called amountArray and creates input fields for the amounts. The input fields have the same name called fieldAmount. When I enter value, I know which ...
user avatar
  • 73
0 votes
0 answers
408 views

How can we add onblur event for lightning:inputField

I need to add onblur event for lightning:inputField. Right now as per the documentation (https://developer.salesforce.com/docs/component-library/bundle/lightning:inputField) I dont see a direct by ...
user avatar
  • 113
1 vote
2 answers
1k views

New record Create option not available in lookup field in <lightning-input-field> tag

All I have a requirement to create a custom Case form with few fields. In Contact lookup, I am not able to see the option to create Contact. Can anyone guide me what I am missing in the code. HTML: &...
user avatar
  • 657
0 votes
1 answer
168 views

How to add a search button with a logo?

I want to add a search button to the form, like in the screenshot below and I have the following code that I found in the documentation. <aura:component> ... <div class="...
user avatar
2 votes
0 answers
32 views

Aura component and LWC are not supporting Nepal locale

I have a requirement where I need to show date in Nepal locale in both Lightning Web and Aura components. This shows the date in, for example - २०२१/२/१७ format in Salesforce but on LWC and Aura, it ...
user avatar
  • 41
0 votes
0 answers
28 views

Highlight the Validation Error on the corresponding Field

Can anyone tell how the implementation of highlighting the validation error at field level can be achieved using Lightning Aura Components? I have tried using validity functionality option in my code ...
user avatar
0 votes
2 answers
2k 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 ...
user avatar
0 votes
1 answer
361 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 ;/ &...
user avatar
  • 35
0 votes
0 answers
547 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-...
user avatar
  • 15
0 votes
2 answers
1k 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>...
user avatar
  • 4,521
1 vote
1 answer
1k 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="...
user avatar
  • 33
0 votes
1 answer
323 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 ...
user avatar
  • 77
0 votes
0 answers
23 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"> ...
user avatar
  • 5
1 vote
1 answer
2k 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 ...
user avatar
  • 1,004
1 vote
2 answers
2k 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 ...
user avatar
  • 1,004
5 votes
1 answer
859 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 ...
user avatar
1 vote
0 answers
215 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 ...
user avatar
2 votes
2 answers
759 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 ...
user avatar
1 vote
1 answer
2k 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 ...
user avatar
1 vote
2 answers
3k 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 ...
user avatar
4 votes
2 answers
2k 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 ...
user avatar
1 vote
0 answers
387 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 '<'...
user avatar
3 votes
1 answer
17k 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 ...
user avatar
0 votes
2 answers
2k 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 ...
user avatar
0 votes
0 answers
36 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}...
user avatar
2 votes
1 answer
3k 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 ...
user avatar
  • 5,596
0 votes
1 answer
143 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" ...
user avatar
  • 115
0 votes
1 answer
267 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: ...
user avatar
  • 1,431
1 vote
0 answers
2k 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 ...
user avatar
0 votes
2 answers
4k 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 ...
user avatar
  • 95
4 votes
2 answers
7k 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 ...
user avatar
  • 129k
2 votes
1 answer
1k 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 ...
user avatar
  • 129k
2 votes
1 answer
879 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, ...
user avatar
0 votes
1 answer
1k 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 ...
user avatar
  • 423
0 votes
1 answer
127 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-...
user avatar
0 votes
2 answers
1k 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 ...
user avatar
  • 989
3 votes
1 answer
304 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 ...
user avatar