Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
36 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 ...
0
votes
0answers
15 views

lightning:inputfiled with user look up not working Lightning-lookup-desktop.js:2 undefined error [closed]

I have used lightning:recordEditform and inside that, I have used user look up and when I search the user in that look up it shows the users list but it's not selecting the user. This issue happens ...
1
vote
1answer
28 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
0answers
26 views

Lightning:input[type=number] value attribute is string instead of number

I encountered a fascinating bug (or feature) in the lightning:input[type=number] component and I was wondering if any of you have had this problem before? I'll describe what happens: My lightning ...
0
votes
1answer
29 views

Can't save Salutation Field when using a Lightning Input Field

I'm making a lightning component with a lightning:recordEditForm and lightning:inputField to edit Contact records. <aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,...
0
votes
0answers
44 views

Multi insert records with lightning:recordEditForm - Dynamic Binding - FieldSets - Empty Fields

I'm a Jr working with Lightning Components, and I have a problem, I read all the possible documentation related to lightning:recordEditForm but I didn't have success with the issue that I have. I'm ...
1
vote
2answers
125 views

Conditional Rendering in Lightning Component with more than Aura:If(True, ELSE)

I have a lightning:select picklist on a Lightning component called "Best Method of Contact" which is a required picklist, but the required picklist defaults to a blank 'placeholder' value that the ...
0
votes
0answers
46 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
1answer
58 views

Lightning:inputField lookup icon missing

I am using the Lightning:inputField to render a lookup (custom object) inside a RecordEditForm. Though the functionality works fine, the object's icon does not render, like it does on a standard edit ...
0
votes
1answer
73 views

<lighting:inputField> disabled in a custom Lightning component when using standard lookup

I am trying to understand why the ownerid field shows up as an uneditable field <lightning:recordEditForm aura:id="recordViewForm" objectApiName="Case" ...
1
vote
2answers
492 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
39 views

lightning:input methods - which are available? [closed]

Mistake in Lightning Component docs or my misunderstanding? From the Lightning Component Reference at the very bottom of the "Documentation" tab it reads, This component supports the following ...
0
votes
1answer
93 views

Can we perform frontend validation with lightning:inputField? [duplicate]

I'm creating some small lighting components for use with Quick Actions. While "Never trust the client" means I will have backend validation, for a good user experience, I'd prefer to prevent bad data ...
2
votes
1answer
172 views

Component set() does not work on lightning:inputField if user changes the field value

I'm finding the component.set method only works on lightning:inputField components when the user has not changed the value in that field. See code example below. Component: <lightning:...
1
vote
1answer
199 views

Set custom placeholder in lightning:recordEditForm

I have a form in Lightning Components written using lightning:recordEditForm. Inside that form I have lightning:inputField which is a lookup. Is it possible to set a custom placeholder in this input? ...
4
votes
2answers
102 views

accessing a lighning inputField lookup name client side

I am easily able to fetch a lookup ID from a inputField <lightning:recordEditForm objectApiName="Case"> <!-- the messages component is for error messages --> <...
0
votes
3answers
94 views

lightning:inputRichText to show email Template Body

I am using lightning:inputRichText to show email template body. But it is displaying all the text in one single line. How can i put it in format? Following is the code i am using in controller to set ...
2
votes
1answer
51 views

Access Text Value lightning:inputField lookup

Is there a way to access the text value of a lightning:inputField of lookup type? .get('v.value') returns the ID but I also want to retrieve the text value displayed within the lookup as well.
2
votes
0answers
198 views

Are Lookup Filters supported in Custom Lightning Components?

So, there are two ways to get Salesorce Standard Lookup filed in Lightning components: force:inputField and lightning:inputField. However, no matter what I do, I can not get lookup filters to work. ...
0
votes
1answer
249 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 ...
0
votes
4answers
639 views

Lightning:input mandatory=“True” not fired on button click

I have a Lightning component with input fields with some mandatory. At the end of the page, I have button when clicked, gathers all the info entered and creates a record in back end. I assumed when ...
9
votes
5answers
1k views

Pre-populate field values in lightning:recordForm onload

I'm using lightning:recordForm to display create view for a custom sObject. It works as expected, but I cannot find a way to pre-populate some of the fields for create view, e.g. lookups. ...
0
votes
0answers
19 views

Is there any way to put a lightning inputField in the HIF at once as shown in the picture below?

Is there any way to put a lightning inputField in the HIF at once as shown in the picture below? We want to embed the Lightning inputField and want it to work in the getHolidayActionList class below. ...
6
votes
2answers
595 views

Did they break lightning:input with Summer'18?

I'm aware that it's still beta, but I didn't expect them to break it for older api versions :/ <aura:application extends="force:slds"> <aura:attribute name="myNumber" type="Decimal" ...
3
votes
1answer
1k views

Lightning:inputField not allowing decimal numbers to be inserted

I am using <lightning:recordEditForm> and <lightning:inputField fieldName="customField"/> to create a form. My custom field is Number field with setup number(16,2) - length 16, decimal ...
3
votes
0answers
272 views

Are lightning:recordEditForm and lightning:inputField a bit buggy in Spring'18?

I'm trying to get my hands on lightning:recordEditForm and lightning:inputField Im using it on Order Line Item like this <lightning:recordEditForm recordId="{!item.Id}" objectApiName="OrderItem" &...
6
votes
1answer
214 views

Is it possible to mass-save many lightning:recordEditForms with only ONE button?

Im implementing an line item editor for the "Order" SObject and want give lightning:recordEditForm with lightning:inputField a try for this. What I have so far is an edit for the order combined with ...
1
vote
0answers
84 views

How can lightning:inputField support human inputs of “10k” , how to make it support locale and how to make it consistent to other inputs?

I have a the following markup <aura:iteration items="{!v.Items}" var="item"> <lightning:recordEditForm recordId="{!item.Id}" objectApiName="OrderItem"> ...
4
votes
3answers
763 views

How to use $A.createComponents() on lightning:recordEditForm with nested lightning:inputField?

I've asked this question to change the objectApiName attribute of lightning:recordEditForm. Thanks to the great answer of @PranayJaiswal I found a workaround. Now I soon will face the need of having ...
7
votes
1answer
1k views

Is it possible to use lightning:recordEditForm dynamically on different object types with variable objectApiName?

I need to create an edit component for an SObject from which I do not know the objectApiName at design time. I only know the Id of the SObject. objectApiName could be any valid SObject-name. Now I ...
3
votes
1answer
331 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 ...
4
votes
2answers
401 views

Lightning InputField component with Salutation field

I'm using the lightning:recordEditForm with lightning:inputField and it's going quite successfully. However, I've run into an issue with the Contact.Salutation field. It works when it's a part of the ...
0
votes
0answers
896 views

How can we fire onchange handler when we dynamically change component v.value?

I'm trying to build a simple component: testComponent.cmp <lightning:recordEditForm aura:id="editForm" objectApiName="Contact" ...
0
votes
2answers
527 views

Picklist field does not show dropdown arrow with the force:inputField tag

Working on a form that needs to get an user's input on a picklist field. I am using the force:inputField tag to bind the input field. But the physical look of the picklist field is a little off. See ...
3
votes
1answer
1k views

lightning:input (text) - is it possible to have multiple patterns

I have a field that checks for 2 patterns. What I currently have is, in the text field's onchange handler, i check if the inputted string matches a certain pattern. However, I want to use lightning's ...
2
votes
1answer
943 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 ...
9
votes
2answers
5k 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"> <...
1
vote
3answers
921 views

For what reason there are force:inputField and lightning:inputField if both of them correspond to Lightning Components?

In a Lightning Components Developer Guide there are two inputFields - [one] in a force namespace and a [second] in a lightning namespace. Looks like both of them serve the same purpose (being an input ...
3
votes
0answers
517 views

lightning:inputField as lookup missing “New Record” option

Is it just me or is the lightning:inputField component missing the "New Record" option when it's rendered as a lookup? Right now I have to type a value in the lookup field, hit enter, and wait for ...
14
votes
2answers
2k views

Anyone got a lightning:inputField working for a lookup?

I have a lightning:recordEditForm containing lightning:inputFields that I want to use to create a simple custom object. The 3 fields are: A picklist A lookup to Contact A lookup to Account presented ...
6
votes
1answer
1k views

Add onchange event for lightning:inputField in $A.createComponents

I am trying to create a lightning:inputField using $A.createComponents. The issue I have is that I am not able to add an onchange event. The field Level__c is a picklist field. When I use the ...
2
votes
2answers
324 views

Error on double click on lightning:inputField lookup field

I created a lightning:inputField which supposed to show the lookup field for customer. However, when I double click on the field or when I try to select the current entry I get an error message. <...
2
votes
1answer
821 views

Spring 18 : Value Attribute in lightning:inputField

i am trying to set value to the lightning:inputField using the value attribute. The value attribute seems to work during the init handler event of the component. however i have a onchange for ...
6
votes
1answer
5k views

Setting attribute required to lightning:inputField

in Salesforce classic I created an object ,Equipment__c' and the field ,License plate' amongst others. We are using the object ,Equipment__c' for different types of equipment. For trucks the field ,...
2
votes
2answers
1k views

Binding lightning:inputField to a client-side SObject instance not an SObject Id?

My reading of the lightning:inputField and related lightning:recordEditForm docs is that the record is read and written based on the Id supplied via the recordId attribute. There is no option to bind ...
3
votes
2answers
5k views

Set field values on lightning:recordEditForm (record create mode)

I am using lightning:recordEditForm to display records that may be new or existing. This is working nicely, however I now want to preset one of the fields. The fields are displayed using lightning:...
6
votes
1answer
1k views

How to validate the values before saving a record through lightning:recordEditForm and lightning:inputField?

I'm using lightning:recordEditForm and lightning:inputField to update a record. I need to validate the values before updation and I couldn't find any ways to get the values from lightning:...
5
votes
2answers
2k views

I'm unable to enter values in my lightning input

Hi I'm totally new to lightning. I'm trying to create a form with input fields. But I'm unable to enter any values or set date or toggle the checkbox. Here is the lightning component. I have added ...
0
votes
1answer
690 views

How to get Lightning date picker UI as in LDS design?

I need the following Datepicker UI design as show in LDS base variant. https://lightningdesignsystem.com/components/datepickers/#content https://developer.salesforce.com/docs/atlas.en-us.lightning....
0
votes
1answer
1k views

Lightning:input field - focus and enter key in Lightning Component

I have a input field in lightning component and I'm struggling with two requirements. Autofocus - after page is loaded and on Enter key I want to trigger function. I can handle those requirement ...