Stack Exchange Network

Stack Exchange network consists of 175 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.

1
vote
0answers
45 views

How to prepopulate Address field in lightning:inputField

I need to prepopulate fields in lightning:recordEditForm and then get their values to save using Apex (without submitting form itself). What I've already tried: ...
2
votes
2answers
153 views

Summer 19 breaks undocumented lightning:inputField feature - variant=“label-hidden”, what are alternatives?

Seems like attribute doesn't work anymore. I know before label-hidden variant, I used to be able to hide labels using some CSS. Unsure what it was anymore.
4
votes
0answers
130 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
1answer
98 views

Lightning Web Components, how to set lightning-input autocomplete=“off” [on hold]

I have a lightning-input with type="search". I am having trouble to set autocomplete="off" to be able to disable autocomplete functionality of modern browsers like Chrome. Any help on this is ...
0
votes
1answer
34 views

Toggle input: there is a way to control the alignment of label and toggle?

The following code generate toggle inputs with the corresponding label on their left but the toggles themselves are not aligned. <template> <div class="slds-box"> <h2 ...
1
vote
1answer
132 views

lightning:inputField Lookup mobile

So I know that on mobile <lightning:inputField> for lookup fields doesn't work. It's right there in the documentation (not clearly, but it's there if you know what to look for). But if you check,...
0
votes
2answers
101 views

Unable to display the multiple picklist field values in lightning component

I am trying to display 3 different picklist field values in a input form using lightning component. I am able to display the values for any one of the picklist field only. If I try to display the ...
0
votes
1answer
25 views

lightning:inputField value not overriding for lookup field

We have a Lightning Component with some of this: <aura:attribute name="editRecordId" type="string"/> <aura:attribute name="serviceId" type="string"/> <lightning:recordEditForm ...
0
votes
0answers
23 views

How to validate lookup lightning input field in record Edit form

I have a record edit form with multiple custom lookup fields. Standard validation rules on lookup fields with an invalid input would give an error message "An invalid option has been choosen". Looks ...
0
votes
0answers
29 views

Displaying checkbox after the field name while using lightning:inputfield

Need a small help in displaying the checkbox after the field name while using lightning:inputfield <lightning:recordEditForm aura:id="editForm" recordId="5000D0000024fvcQAA" objectApiName="Case"&...
1
vote
1answer
72 views

Lightning Input on wrapper class not passing back the value

I am using a wrapper class so as not to have a glut of aura:attributes (this may be the problem in and of itself). I have a previous lightning component that has about 16 attributes and passing them ...
3
votes
2answers
1k views

Make field required with lightning:inputField and lightning:recordEditForm

There is no setting for the lightning:inputField to make it required. idea: https://success.salesforce.com/ideaView?id=0873A000000lKNbQAM docs: https://developer.salesforce.com/docs/component-...
0
votes
1answer
99 views

force: inputfield is not working properly for lookup fields inside the aura:iteration

<td valign="top"> <force:inputField aura:id="lookup" value="{!v.conitem.CERM__Account__c}"/> <br/> </td > <td IconName="custom:custom17" valign="top"> ...
1
vote
1answer
47 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 ...
0
votes
0answers
150 views

Lightning:inputField Could not find picklist values for field using GlobalValueSet

I'm using the lightning components lightning:recordEditForm and lightning:inputField to compose a form for a Record Creation. the component works correctly as long as I do not use a picklist field ...
0
votes
1answer
450 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 ...
1
vote
1answer
439 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 ...
2
votes
0answers
219 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
105 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,...
1
vote
2answers
1k 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
256 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
231 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
261 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" ...
2
votes
2answers
3k 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
82 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
143 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
899 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
483 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? ...
5
votes
2answers
139 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
218 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
116 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.
3
votes
1answer
362 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
389 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
1k 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 ...
11
votes
5answers
3k 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
751 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
3k 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
327 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" &...
8
votes
1answer
280 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
88 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"> ...
7
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 ...
9
votes
1answer
2k 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
401 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
653 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
2k 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
649 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
2k 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
1k 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 ...
11
votes
2answers
8k 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
1k 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 ...