People who code: we want your input. Take the Survey

Questions tagged [lightninginput]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
32 views

lightning search input type is not displaying the expected result

I have search input box on searching the account names in the input box it should display the list of account names but i am unable to see the result i inspected my code but don't see any issues. Can ...
0
votes
0answers
21 views

I want to display NO value in output field if the value is null [closed]

I have a requirement need to display 2 fields from case object but if the field value of one if the field is null then display No else display the field value. I need the label of the field for that I ...
1
vote
2answers
40 views

How to align Lightning-input field-level-help with label when label is more than one line long?

I'm using a lightning-input. The label of the input is a bit too long and appears on two lines. When I add a field-level-help, instead of putting it on the second line where there is plenty of space, ...
1
vote
0answers
31 views

Lightning Web Component 'lightning-input-rich-text' Change Font Size

I have a lightning-input-rich-text (LWC) in which I'd like to change the default text size from 12 to 10. On following the instructions in https://developer.salesforce.com/docs/component-library/...
0
votes
0answers
21 views

Unable to display error message when field is required and disabled

In my aura component i have lightning input where the value i am auto populating. The ask is to restrict user from entering any value. Have made the field disabled and required. But if the value is ...
0
votes
0answers
25 views

How to set focus on an input field after rendering in lwc

I am trying to set focus to an input field after it is rendered, the input field is focused initially but after the whole component is loaded the focus goes away. renderedCallback() { console.log(...
0
votes
0answers
30 views

How to set default value for Number field in Lightning Component

I have a lightning input field and I want to set the default value as 0 when the Lightning component is loading, <lightning:input type="number" aura:id="coiId" label="...
0
votes
0answers
17 views

Lightning:input - max length attribute is not working in Android device

Below is the line of code for input element: <lightning:input type="text" aura:id="input1" label="{!$Label.c.Helptext}" maxlength ="20" value=&...
0
votes
0answers
61 views

how to add table programmatically in lightning-input-rich-text?

As per the documentation "Although a toolbar button for creating tables is not available, creating tables programmatically or copying from a browser window and pasting these elements preserves ...
0
votes
0answers
26 views

lightning-input autosuggest

I have a LWC with a lightning-combobox whose options are populated via an apex query of records. The record list changes depending on the user accessing the LWC. There is one user for whom the query ...
0
votes
1answer
28 views

event.setParam not working

Below is my code. My requirement is I want to uncheck a checkbox from the javascript controller based on some conditions. This is my code; HTML part <lightning:input type="checkbox" class=...
0
votes
0answers
29 views

How do I open a new form and query the database at the same time?

On the current page, I have a "New" button that opens a new form, where I need to fill in the "Account" field as well. And I want to get a list of "Account" values ​​in ...
1
vote
1answer
57 views

Radio button requires two clicks to “check” even though conditional template renders

I am working on a component that has a simple 2 option radio group. I want to show and hide a div (template if:true) based on the selected radio option. What I have here almost works but I have to ...
0
votes
0answers
24 views

updateRecord working very slow/inconsistently on conditional input text

I have an lightning-input text box and I'm trying to add the input value to one of multiple fields using updateRecord of the uiRecordApi, depending on if it has a value already or not. It either works ...
2
votes
0answers
25 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 ...
1
vote
1answer
32 views

Pass Lightning input iteration value by index of String array

I have a lightning component where I dynamically generate some columns and some input fields. I have a String Array as attribute. How do I get the index of the array to pass the value. I tried below ...
0
votes
0answers
30 views

Community Screen Flow Date Input Error Message wrong?

A client I am working with has a 'registration' screen flow that captures customer information and is on a Salesforce Community behind a login wall. For some reason the Date Input shows a funky error ...
0
votes
1answer
13 views

lightning:input update time value

I have two time inputs for start and end times: <lightning:input type="time" name="startTime" label="Start Time" min="05:30:00.000Z" max="19:00:00.000Z&...
0
votes
2answers
211 views

lightning-record-edit-form with lightning-input-address show-address-lookup to true to create an Address record

I am creating a custom LWC component to create a new Address record. I've used the lightning-record-edit-form like below, <template> <lightning-record-edit-form record-id={currenRecordId} ...
0
votes
0answers
16 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 ...
0
votes
1answer
50 views

Understanding regex behavior with Lightning Input [closed]

I'm new with all the LWC topic. But for now I'm having issues with some regex. To Begin with I have my own LWC created with a few fields some of them are type number such this one: <lightning-input ...
0
votes
1answer
119 views

lightning:input type=“time” displays millisecond value when editing object

I am building a lightning component to create/edit custom objects. I've been able to do this with force:inputFields in the past but unfortunately ran into a component error that the new recommended ...
0
votes
1answer
166 views

how to manipulate lightning:input type=“toggle” so that it worked as a Radio button

I want a controller logic for aura component so that my lightning:input type="toggle" worked as a radio button. <aura:component> <aura:iteration items="{!v.ebpEmpType}"...
1
vote
1answer
28 views

Is there a way to make the lightning-input placeholder text appear smaller

I'd like to make the placeholder text to appear smaller in the lightning-input component. Is it possible? and if yes, how can I achieve that? Thanks!
0
votes
1answer
75 views

Display lightning-icon in lightning-input and add onclick action

I'm trying to add icon inside input and that's fine, but when i try to add some action like onclick it doesn't work. On front when i try to click on the icon i can not do this, cuz input hover it ;/ &...
0
votes
1answer
27 views

lightning-input loses alignment on display of error/validation msges with other form elements

Trying to make this work <template> <p>This example creates a simple layout with field headers.</p> <lightning-layout vertical-align="end" class="slds-form&...
0
votes
0answers
87 views

LWC lightnig input type date max value dynamically

LWC lightnig input type date max value dynamically I'm trying to add max Date as 2 years from now. Getting the error ass add_years is not defined Any suggestion would be great.. Html: <lightning-...
0
votes
0answers
125 views

Style lightning-input like lightning-input-field

I'm using lightning-inputs in the middle of my record-edit-form to provide greater flexibility. Unfortunately their styling is different than that of the lightning-input-field which means they are not ...
1
vote
1answer
499 views

Clearing validation errors on clicking clear filters icon not working on LWC lightning-input

The validation errors are cleared only on the second click of the button. But i need this to be working on the first click. Kindly help. My current code is as follows : HTML CODE : <div class="...
2
votes
1answer
763 views

Restrict past dates in lightning-input

I would like to block my user from selecting a date that happened in the past in a lightning-input of type date. For this I would like to use the min attribute of the type date. This is the html code ...
0
votes
0answers
29 views

Email pattern not working

Hi this pattern is not working in an Aura component and i've no idea why... <lightning:input aura:id="Eemail" name="email" value="{!v....
0
votes
1answer
47 views

optional file upload in <lightning:input …> [closed]

I'm using <lightning:input ... type="file"> to allow file upload on the UI. Is there any way I could make it optional in the component itself? instead of taking care of the check ...
0
votes
1answer
833 views

Get value of lightning-input and lightning-combobox from for loop in LWC

I am displaying data in LWC from an array in a for loop. The loop is using both lightning-input and lightning-combobox for inputs. <template for:each={tobeOppProduct} for:item="data"> ...
0
votes
0answers
22 views

switching from force:input to lightning:input causing styling and functionality errors

switching from force:input to lighting:input and have run into a few errors. first, my styling is off and I'm not sure why. here's my code for these sections- <div class="slds-grid"> ...
0
votes
1answer
357 views

Drag Drop from Popup not working on Mozilla Firefox and Internet Explorer for lightning-input type=“file” in LWC

I have the following code for File input in LWC. The drag-drop works fine for chrome, edge browser. But for Mozilla Firefox browser and Internet Explorer, If we select the button and open the popup ...
1
vote
0answers
150 views

lightning input type = date, max attribute behaviour not similar in production and lower enviornment

I used max attribute of lightning input type date to disable the future dates in date picker. It was working in lower environments, but not working in production. In Lower Environments: It shows the ...
0
votes
1answer
221 views

Changing the UI and text display of lightning-input type=“file”

I want to change the UI of lightning-input type=" file". Current UI Look something like this: But, I want the UI to be something like this: Is it possible to change the styling and apply ...
0
votes
0answers
351 views

Reset invalid value in lightning-input date to a blank value on click of a button

I have a lightning-input of type date. When I enter an invalid value in this field, there is a validation displayed 'Your entry does not match the allowed format MMM d, yyyy.' I want to clear this ...
1
vote
1answer
121 views

lightning-input of type “toggle” - any way to change the Inactive/Active text?

For this component:: <lightning-input type="toggle" ...></lightning-input> the "Inactive" and "Active" text appears to be fixed: Is it? Is coding this up ...
0
votes
0answers
203 views

LWC styling for iOS - lightning input is going off the screen

I've experienced a strange problem on Salesforce app for iOS. I have LWC component with searchbox. It's a standard lightning-input and search result list as an ul element with li as options. On ...
0
votes
1answer
498 views

Get final Lightning input value in LWC JS

I have a lightning-input tag in my LWC HTML file and i want to get the final value of the text which user inputs. I have a onchange event but it gives me value on every change. for eg. if the user ...
0
votes
0answers
145 views

Dropdown is not getting close in the Lightning Input box in LWC

Hi I have created the lightning input box which contains some value as a drop down but when i am clicking outside of the drop down anywhere on the page the values which are appearing as a drop down is ...
0
votes
1answer
392 views

Reformat LWC (Lightning Web Component) Input to Credit Card formatting

I have a Lightning Input that when a user types into I would like it to be reformatted to mirror CC Credit Card formatting. For example when I type in 1234567812345678 it updates as the user is typing ...
1
vote
1answer
259 views

How to display account address field values in lightning:component

I'm having a custom lookup input field in my custom lightning component. When I select a contact from that lookup, it should display its related account field values like account name, account type ...
1
vote
1answer
368 views

Upload an image in lwc rich text component doesn't work

I'm using a lightning-input-rich-tex base component and I'm trying to upload an image but it doesn't work Code <lightning-input-rich-text formats={formats} ...
0
votes
1answer
176 views

Accessing the string value of a date-type lightning-input

We're using the onchange event on text-type lightning-input components to apply formatting, so users can quickly enter numbers and have the punctuation applied automatically. For instance, a Social ...
1
vote
5answers
5k views

Change the color of Lightning-input label

I have below code for input text <lightning-input label="Email" class="textInput" value={rec.Name} onchange={handleNameChange}></lightning-input> Here I want to change the color of the ...
0
votes
2answers
237 views

value not retaining when showing a different template

I am very new to LWC. And i am confused about why value is not coming in input text when i am going back to the same div(template). <template> <br/> <br/> <template if:true={...
1
vote
1answer
395 views

How to allow decimal input whose number of decimal places is lower than the step value of input component

I have a lightning input component with the attributes as type="number", formatter="decimal",and step="0.01". However, this seems to restrict the decimal input to be of exactly 2 decimal places. Is ...
1
vote
1answer
228 views

Binding array nested in a map to a lightning input component not working as expected

I have a component attribute which is as follows: <aura:attribute name="variants" type="Map" default="{names: ['Tom', 'Dick', Harry']}" /> The array in the map is used in lightning input ...