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
67 views

Check input email and suggest a correct domain if there typing mistake

There is a email lightning input. Let's say User will input a value for that as below. Ex1- [email protected] (gimail should correct by giving a suggestion as gmail) Ex2- [email protected](.co should ...
Buhuni's user avatar
  • 9
0 votes
2 answers
783 views

Email validation not working in LWC lightning-input

I have a lightning-input of type="email" to which I'm trying to add a pattern validation. I added regEx as below but it seems to be not working as expected. Html: <lightning-input name=&...
sfdcDev's user avatar
  • 25
0 votes
0 answers
56 views

LWC Controller creates record with combo box but not lookup

So I have an LWC component. I've put a child component lookup input and 3 other number and text input fields in a repeating section on HTML, that works great. <div class="slds-col margin-...
Rufus K.'s user avatar
  • 505
1 vote
1 answer
249 views

Replicate border focus behavior lightning input

I'm using this repository because I needed a multi select combobox like this and works fine except the input is not a lightning-input so it doesn't have the blue border focus like this: https://...
Alexia's user avatar
  • 81
0 votes
1 answer
348 views

Is it possible to restrict picklist values for a lightning-input-field?

Currently, it seems that there is no way to remove some of the options for a picklist while using the lightning-input-field (in my case on the lightning-record-edit-form). The only solution I came up ...
Ivan Sudakov's user avatar
0 votes
0 answers
48 views

Lightning:input and Lightning:inputField are different alignment

I want to use both lightning:input and lightning:inputField in the same component but I cannot format these 2 input types into the same alignment even thought I'm using the same <div> tag. For ...
Tuấn Trần quốc's user avatar
0 votes
1 answer
23 views

How can I get a specific Lightning:inputField cmp without change the aura:id

I have a component with 2 inputFields like this: <lightning:recordEditForm recordId="{!v.recordId}" aura:id="recordEditForm" objectApiName="Example__c" > <...
Tuấn Trần quốc's user avatar
1 vote
1 answer
537 views

Salesforce LWC edit form not showing input fields

I have poured through the articles and answers, tried updating the code base to some solutions based on those articles, checked FLS and Profile access to ensure proper access to the fields and I still ...
Finnster's user avatar
0 votes
0 answers
39 views

what is the slds class for unmasking the value in </lightning-input-field> ->iam trying to add show/hide icon-its not working for preview

<lightning-icon size="x-small" icon-name={passwordIcon} alternative-text="Preview" title="Preview" onclick={passwordHandler} class=...
Lavanya's user avatar
1 vote
0 answers
577 views

Lightning-input vs lightning-input-field

I am facing issues with using both Lightning-input and lightning-input-field. Some of my requirements are satisfied with Lightning-input and some with lightning-input-field.Here are issues faced. ...
CodeGirl's user avatar
0 votes
1 answer
883 views

Change label colour lightning-input LWC

Hello guys I am trying to change the label colour of a lightning-input in a Community that has a green default colour. I tried this approach: <lightning-combobox label="Item" class="...
TechGuy's user avatar
  • 97
0 votes
0 answers
94 views

Clear value after button clicked

I have three different lighting component: Lightning input rich text Lightning input search Lightning input file Lightning datatable After a button is clicked I want to delete all the values the ...
TechGuy's user avatar
  • 97
0 votes
0 answers
22 views

Attach multiple files in Push Notification

Hello I and using a lightning-input file that allows the users upload multiple files. In the apex controller I want to send a push notification to clients with a message and the attached files the ...
TechGuy's user avatar
  • 97
0 votes
1 answer
148 views

avoid deleting all files LWC

Hello I am working on a lightning-input field whose type is a file. In this component I want to allow the users to upload several files and show its name and an option to delete the selected file the ...
TechGuy's user avatar
  • 97
0 votes
2 answers
3k views

.querySelector return value from lightning-input-field based on field-name

I want to have a button on my LWC to validate the values of my lightning-input-field's and lightning-input fields. I am trying to return the value of my lightning-input-fields based on the field-name ...
Jeff Callahan's user avatar
0 votes
1 answer
123 views

lightning-input-field not showing only in package

I have a lightning record edit form which properly shows in my dev org, but when it's packaged, the lightning-input-fields no longer contain any html. I've confirmed that data is properly sent from ...
Chris's user avatar
  • 1
0 votes
1 answer
1k views

Persistent Input fields in LWC for iteration of records

We have a picklist field displayed using lightning combobox & standard record edit form which will run a iteration against collection of records and display various fields of that object in edit ...
user126869's user avatar
3 votes
2 answers
2k views

How can I change the background color of an input in a lwc?

When changing the background-color attribute of a <lightning-input this also changes the label's background. Inspecting the input I found a class called .slds-input which allows you to change the ...
Sean's user avatar
  • 51
0 votes
1 answer
270 views

Template Expression Doesn't allow for Computer Expression in lightning-input-field

I have been trying to iterate through and access some data that I'm getting from an apex call. I have a list of field IDs that I get from a field set something like this.positionFieldIds=['Name', 'Id',...
Kevin Yao's user avatar
1 vote
1 answer
347 views

Show again a hide field LWC

Hello everybody I am working in a LWC trying to show and hide two fields when one is filled with data the other one is hided. And if this filled field is erased the other one appears. And vice versa. ...
user avatar
0 votes
1 answer
348 views

Populate input field with data LWC problems

Hello everybody I am currently working on a Flow that receives the Id from the record where the LWC action is and pass it to the LWC. The LWC is a form that shows some lightning-input and lightning-...
user avatar
0 votes
1 answer
239 views

Aura component replace highlighted text

Hi I want to be able to have the user highlight text in a lightning:inputRichText component and then be able to replace it with a link. I am able to get the highlighted text with window.getSelection()....
Toby's user avatar
  • 11
0 votes
1 answer
640 views

Align Vertically Combobox and Lightning Input

I need to align 4 inputs fields that are dynamically build (c-filter-component), they can be either of type combobox or of standard lightning input and maximum 4. The problem is I am unable to align ...
Juan Ge's user avatar
0 votes
1 answer
2k views

How can I set the actual date as a min value to my lightning-input datepicker?

I am trying to set the actual date (today) as a minimum value to my date picker, using LWC. I can't make it work, as I get a component error message that "today is not defined". HTML <...
Klosmi's user avatar
  • 3
0 votes
1 answer
1k views

LWC input field tag, add custom values in standard picklist

In lightning-input-field, I am displaying Opportunity Stage field. My record type has 10 picklist values. I want to display only 5 picklist values. Is there a way we can set picklist options in the ...
Harshith Srinivas's user avatar
0 votes
0 answers
773 views

LWC Input field autocomplete

Form : List of fields : Contains Cases's Fields When users choose account , the value should suggest all accounts records - So the value field should be based on the selected value from List Of ...
user avatar
1 vote
1 answer
2k views

align lightning input inline label to the right

I've tried a few things and no matter what I do I cannot get the lightning inline label to align to the right instead of the left. I would like the First Name and Last Name label to align to the right ...
Ohmicron's user avatar
  • 662
1 vote
2 answers
4k views

How do I prevent checkbox being checked if user doesn't confirm the edit?

I have a lightning-input checkbox. When the user checks it, I show a confirm dialog. If the user confirms the edit, the checkbox should get checked and disabled. If the user cancels, however, the ...
Chuck's user avatar
  • 877
0 votes
1 answer
529 views

Clear value of lightning input field that is a rich text

I'm trying to reset form field values after submitting a form with lightning-record-edit-form but haven't been able to reset the rich text field. The HTML is this: <lightning-layout-item padding=&...
Fab's user avatar
  • 1
2 votes
1 answer
336 views

How to reset address search lightning:inputAddress when showAddressLookup="true"

I am using the lightning:inputAddress on an aura lightning component with showAddressLookup="true". The user can start typing an address in the search field and it will auto-complete the ...
Michael Robert's user avatar
0 votes
0 answers
426 views

Manipulating lightning-input-field time field value

I'm trying to figure out what's the best way to manipulate value for time field from javascript. When loading a record with LDS the value of the time field is an integer represented in milliseconds, ...
alechko's user avatar
  • 53
0 votes
1 answer
774 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 ...
D.Kat's user avatar
  • 56
0 votes
0 answers
199 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 ...
Daniel Quijada's user avatar
1 vote
0 answers
146 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, ...
Aarushi's user avatar
  • 11
0 votes
2 answers
1k 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-...
JonSnow's user avatar
  • 179
0 votes
1 answer
418 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 ...
Austin Kelly's user avatar
0 votes
2 answers
4k 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" ...
Gargi Gupta's user avatar
1 vote
0 answers
2k 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-...
anxiousAvocado's user avatar
2 votes
0 answers
283 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 ...
Greg's user avatar
  • 25
0 votes
1 answer
246 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> ...
Chuck's user avatar
  • 877
5 votes
1 answer
421 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 ...
jpmonette's user avatar
  • 4,400
6 votes
2 answers
2k 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 ...
mvk1991's user avatar
  • 535
0 votes
0 answers
332 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 ...
Bilal Malik's user avatar
0 votes
1 answer
569 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 ...
Eric's user avatar
  • 73
0 votes
0 answers
1k 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 ...
AdityaHM's user avatar
  • 133
2 votes
2 answers
4k 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: &...
Tamil's user avatar
  • 714
0 votes
1 answer
552 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="...
unique user's user avatar
2 votes
0 answers
56 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 ...
Bhavya's user avatar
  • 41
0 votes
0 answers
125 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 ...
Salesforce Developer's user avatar
2 votes
2 answers
6k 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 ...
apc's user avatar
  • 63