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
4
votes
2answers
7k 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 ...
0
votes
1answer
41 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 ...
0
votes
1answer
1k 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
387 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 ...
1
vote
2answers
1k 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
1answer
24 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-...
1
vote
2answers
1k views

lightning:recordEditForm | Some input fields not being displayed

I'm trying to create a new form for a custom Object in salesforce. This is my form Code: <lightning:recordEditForm aura:id="MyFormId" objectApiName="...
0
votes
1answer
663 views

How to put asterisk in lightning-input-field - LWC

My requirement is to put an asterisk before a lightning-input-field in my LWC. So I tried below code :- Earlier :- <lightning-input-field field-name='AccountId'></lightning-input-field> ...
0
votes
1answer
604 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 ...
4
votes
1answer
589 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 ...
0
votes
0answers
21 views

Custom Lightning:inputField Validation

I had tried to follow this solution but it does not seem to work for lightning:inputField. Basically I want to stop negative values from being entered in the field. I have tried the solutions below ...
0
votes
2answers
127 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 ...
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 ...
0
votes
0answers
683 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}...
2
votes
1answer
62 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 ...
0
votes
3answers
492 views

Using lightning:inputField, I want to remove helptext

I'm using lightning:input-field in LWC, but I want only the input field, nothing else. I have hide the label using variant="label-hidden", but I automatically get the help-text near the field. And I ...
0
votes
0answers
83 views

Salesforce mobile scrolling issues with input fields

I've been trying to adjust a record form to mobile version of salesforce. However, I'm having issues with scrolling. When I try to scroll down for the first time after page refresh, the screen stops ...
0
votes
1answer
103 views

Fetch Value from template tag in javascript in lightning web component

Please refer to below markup. <lightning-record-edit-form key={field.key} object-api-name="Callback__c" layout-type="Full" > <div class="slds-grid slds-wrap"> <template for:...
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"> <...
0
votes
0answers
20 views

display multiple fields information in one inputfield

How can we show multiple fields information in one inputField? I would like to display multiple fields after select the searched record. In the attachment, multiple fields are shown in the search ...
5
votes
1answer
393 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 ...
6
votes
3answers
6k 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
661 views

Required Validation upon submitting a LWC form

The issue with above approach is that the form is not getting submitted. As we have not defined any type for lightning-button. Yet, it is displaying error messages correctly but I am stuck on how to ...
0
votes
1answer
45 views

Hot to make a dynamic lightning:inputfield required

I have a fieldset which I get from serverside and load on clientside I am adding the required parameter to the field but my component does not alert on required. I added the values behind the fields ...
0
votes
1answer
427 views

Can't pre-populate datetime value in <lightning-input-field>, Summer '19 change/bug?

This issue has just appeared since Summer '19 rollout. It was working correctly before. I have an LWC with a <lightning-record-edit-form> for creating a new appointment record (so no record-id ...
0
votes
1answer
82 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"&...
0
votes
1answer
361 views

lightning:recordEditForm Need to send recordEditForm data back to Apex controller

I am new to Lightning and i have designed a component using recordFormEdit. On the recordFormEdit handleOnSubmit action, i am sending the data back to object using the standard functionality(Without ...
0
votes
2answers
136 views

Trying to use onKeyup in a table which has iteration

I need to get an input filed (let's say an email field) inside a table with a wrapper list iteration. OnFocusout is what I am using right now which will get the row number of the table as aura:id. And ...
0
votes
1answer
249 views

LocalizationService formatDateTime method is not displaying correct time in European Time format

I am not getting expected output in time value. I am passing value as 20190619131800Z through query parameter and trying to format it according to Salesforce User Timezone. I am using lightning:...
0
votes
0answers
24 views

Update lightning:inputField when fieldName updated

I'm using lightning:recordEditForm and lightning:inputField to create new record. But I want to setup my field is automatically: <lightning:inputField fieldName="{! v.myField}" value="{! v.myValue}...
0
votes
1answer
222 views

Set lightning input in a child component based on parent component onChange event

I am implementing simple Contact create/edit form and I have problems with automatic setting of one field (consbp) based on an entry in different field (AccountID). The main component (contactCreate....
0
votes
2answers
368 views

Focusing on an input Field when using <lightning:inputField>

I am using lightning:recordEditForm to display to users custom creation form and using lightning:inputField. However, I am unable to set focus on a particular field. I know that Salesforce doesn't ...
2
votes
1answer
482 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
277 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.
1
vote
2answers
3k 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
1answer
491 views

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

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 ...
4
votes
1answer
845 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
164 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 ...
2
votes
1answer
730 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
376 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
112 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
69 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 ...
1
vote
1answer
195 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 ...
2
votes
0answers
812 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 ...
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 ,...
0
votes
1answer
195 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
103 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
345 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
3answers
517 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 ...
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. ...