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
2
votes
1answer
158 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.
4
votes
1answer
869 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
611 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
3k 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 ...
12
votes
5answers
6k 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. ...
6
votes
2answers
865 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
5k 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
396 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" &...
7
votes
1answer
465 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
94 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"> ...
6
votes
3answers
2k 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 ...
8
votes
1answer
3k 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 ...
4
votes
1answer
601 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 ...
5
votes
2answers
1k 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 ...
1
vote
0answers
3k 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
862 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
4k 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
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 ...
16
votes
2answers
13k 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
2k 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
963 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 ...
15
votes
2answers
4k 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
3k 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
465 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
2k 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 ...
9
votes
1answer
9k 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 ,...
3
votes
2answers
2k 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
9k 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
2k 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:...
6
votes
2answers
5k 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
2k 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
2answers
2k 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 ...
12
votes
2answers
915 views

Is it possible to use the new v41.0 lightning:outputField in huge numbers inside tables? Is it possible to extend it?

Today I'm giving the new v41.0 <lightning:outputField> a try. I want to use it massively inside an <aura:iteration> to build a data-table and want to accomplish the following: ...
1
vote
1answer
9k views

How to use lightning:outputField and lightning:inputField inside an aura:iteration

How can I use the new v41.0 <lightning:outputField> inside an <aura:iteration>? I have tried this <aura:attribute name="Opportunities" type="Object" default="{}" /> <aura:...