Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [lightninginput]

Custom lightning input field can take on different display characteristics depending on 'type' property. A lightning-input component creates an HTML <input> element. This component supports the following input types: checkbox checkbox-button date datetime time email file password search tel url number text (default) toggle

Filter by
Sorted by
Tagged with
1 vote
0 answers
31 views

Searchable Combobox how to avoid gap between lightning-input and listbox

I have developed a searchable combobox as a LWC and everything is working fine, except that there is a little gap between the lightning-input component and the listbox. What do I need to do, do get ...
Andreas Epping's user avatar
0 votes
0 answers
73 views

lightning-input reportValidity does not fire on button click

I have these lightning-input components. The error does not show when the user leaves it empty and clicks on Next button. Also I have two input components here, is there a way I could check the ...
sumchans's user avatar
  • 777
0 votes
1 answer
144 views

Remove checkmark from LWC lightning-input toggle

Is there a way to remove the checkmark when the toggle is in the checked state? This is what I have on my HTML - <lightning-input type="toggle" name="test" data-id={testId} ...
sumchans's user avatar
  • 777
0 votes
2 answers
69 views

I am trying to fetch Account details with the text provided in lightning input lwc

I am trying to fetch the Account Name and Id while entering the text on ligtning input but I am not able to fetch the data from apex here is my code.Pleas help <!-- mySearchListDemo.html --> <...
Puja's user avatar
  • 13
0 votes
1 answer
45 views

Lightning-Input type=date unable to replicate error

We have a lightning-input field, type=date, that has an onchange attribute to do some javascript logic. The logic works about 75% of the time and we can't figure out why. Please assume all things ...
Tony Linz's user avatar
0 votes
1 answer
221 views

Aura Decimal Input value to match number field limit 16,2

I am trying to limit my input number field to exactly match the field values which are 16 digits to 2 decimal digits. Also I want to prevent user from putting something different into the field like a ...
YCS's user avatar
  • 27
1 vote
1 answer
99 views

LWC : Issue on invalid input or characters onKeyDown

On console logs when toggle switch this.isToggled is false, onKeyDown this.inputPattern became [a-zA-Z]* which is correct. I shouldn't be able to type any number when this.isToggled = false. But I can ...
sFDev_newbie's user avatar
0 votes
1 answer
217 views

lightning-input type="datetime" does not hold the time value at first time in the UI

When I select the time first in the date time field it does not hold the value and when I do the same again and select the time first it holds it. Below is my code : JS : @api endDateTime = null; ...
SFDC Learner's user avatar
0 votes
1 answer
252 views

is there a way to get min and max attribute in a lightning:input in js controller in aura component

<lightning:input type="number" name="min_perc" aura:id="required" required="true" class="label-text minPerc" min="0" max="99" ...
Testing1002's user avatar
1 vote
1 answer
443 views

Replicate border focus behavior lightning input

I'm using this repository because I needed a multi select combobox like this and works fine except the input is not a lightning-input so it doesn't have the blue border focus like this: https://...
Alexia's user avatar
  • 83
0 votes
1 answer
44 views

How can I get an element component in aura:iteration

I have an aura:iteration like this: <aura:iteration items="{!v.lsFactorItems}" var="item"> <div class="slds-grid slds-wrap"> <lightning:input aura:id=...
Tuấn Trần quốc's user avatar
0 votes
1 answer
3k views

Difference between lightning-file-upload and lightning-input type="file"

I am using PapaParse to parse my CSV file and the function is expecting the parameter which is the File object. When I use lightning-input type=file the function is working but the file collected ...
Rahul Allada's user avatar
2 votes
0 answers
512 views

How can I give a disabled `lightning-input` a background color?

I have successfully given enabled lightning-input fields in my app background colors using --slds-c-input-color-background, but this seems to be ignored (removed) from the final page rendering. How ...
Chuck's user avatar
  • 967
0 votes
1 answer
589 views

setCustomValidity() working only on first row of dynamic table lightning

I have a requirement where I need to dynamically add/remove table rows and add custom validation on each row in LWC. I achieved dynamically adding and deleting rows but while adding setCustomValidity()...
sfdcDev's user avatar
  • 67
2 votes
0 answers
983 views

Lightning-input vs lightning-input-field

I am facing issues with using both Lightning-input and lightning-input-field. Some of my requirements are satisfied with Lightning-input and some with lightning-input-field.Here are issues faced. ...
CodeGirl's user avatar
0 votes
1 answer
2k views

Change label colour lightning-input LWC

Hello guys I am trying to change the label colour of a lightning-input in a Community that has a green default colour. I tried this approach: <lightning-combobox label="Item" class="...
TechGuy's user avatar
  • 97
0 votes
1 answer
164 views

Help disabling calendar pop up

My client wants to use the date type on a lightning:input component, but wants the date picker calendar disabled. I have tried toying with the CSS, but that really isn't my strength. They're unwilling ...
user127622's user avatar
0 votes
1 answer
172 views

avoid deleting all files LWC

Hello I am working on a lightning-input field whose type is a file. In this component I want to allow the users to upload several files and show its name and an option to delete the selected file the ...
TechGuy's user avatar
  • 97
2 votes
4 answers
6k views

How to prevent LastPass from displaying icon inside lightning-input

Based on this LastPass guidance I've tried data-lpignore and data-lpignore="true", per this markup: <lightning-input if:true={colmod.showme} required={colmod.required} ...
bkwdesign's user avatar
  • 579
0 votes
2 answers
1k views

Why lightning:input type=number is no longer rendered as input type=number?

Why lightning:input type=number is no longer rendered as input type=number? Earlier, when we were using <lightning:input type=number/>, it was rendering as <input type=number> and was ...
Patlatus's user avatar
  • 17k
0 votes
0 answers
92 views

Applying simultaneous filters to datatable

I have four LWC components: - A datatable that displays data - An input text field - A dual listbox - Another dual listbox I need to make input field and both dual listbox work as simultaneous filters ...
Matias Banello's user avatar
1 vote
1 answer
1k views

'Upload files or drop files' to 'Upload file or drop file'

How can I change the 'Upload files or drop files' text to 'Upload file or drop file'. When I am allowing single file upload in lightning-input component.
Akshita Gupta's user avatar
0 votes
1 answer
35 views

Cannot get data in HTML

With this code, I get my data, it is visible in the console, however I think I made an error in HTML because I can't display anything, a little help please Please on how to fix this, I want to display ...
ddev96160's user avatar
0 votes
0 answers
164 views

slds-input css doesn't work

Hello guys I have a doubt related with Lighning-input style. I'm trying to align the value inside the textbox to the right but it seems that my css is ignored by Salesforce. I have the following HTML: ...
Gonçalo Lemos's user avatar
1 vote
2 answers
6k views

LWC get element by value

Why can't I get element by value? I have tried to get id with var, just data and different quotes. //var = id; <lightning-input value={var}></lightning-input> this.template.querySelector(&...
raholed's user avatar
  • 25
0 votes
1 answer
936 views

How to retain user-input in lightning input field

I created an LWC in which I have 3 parts on a page: (here Allergy & Medication are visible). 1st page has 2 input fields, and to view each part of the page, a boolean variable is used (template ...
Paritosh Gharpure's user avatar
0 votes
0 answers
637 views

WYSIWYG editor in Lwc

I have tried using lightning-input-rich-text component to create a WYSIWYG in LWC but given its issues with table (hitting backspace on table content deletes whole table) and image (unable to resize ...
Rahul Boinepally's user avatar
4 votes
0 answers
4k views

LWC lightning-input Currency

In Lightning Web Components (LWC) the 'lightning-input' component supports a 'formatter' attribute which has value 'currency' and this displays decimal values with currency formatting, for example: 1....
John Lewis's user avatar
1 vote
1 answer
2k views

change even on datetime input field does not track time

I am using a datetime input field in LWC: <lightning-input type="datetime" name="input5" label="ADate Time" value={avlue} min={minEndDate} max={maxEndDate} onchange=...
SfdcBat's user avatar
  • 4,811
0 votes
1 answer
555 views

Search input bar layout

I'm trying to use a lightning input type search to make a search bar that I will connect to a database to search throught all my items (but this is not the problem) I would like to show the search bar ...
MashaMasha's user avatar
0 votes
1 answer
710 views

lightning-input checkbox - getting checked rows when submitted

When submit button is clicked, how do I know which rows have been checked? .html <template for:each={products.data} for:item="product"> <a href=&...
mackmama's user avatar
  • 707
0 votes
1 answer
714 views

Date format in lightning-input after changed input value format

An issue in Date format validation in lightning-input type Date: After I changed the input value format according to the latest Salesforce updated ICU locale format for Ireland. The last column shows ...
Himanshu's user avatar
0 votes
1 answer
754 views

How to insert image into lightning-input-rich-text programmatically?

I have an image in base64 format and I want to push the image data explicitly into my lightning-input-rich-text. Is there any way? My code looks like this: <lightning-input-rich-text value={...
nischal vasisth's user avatar
0 votes
1 answer
303 views

What is the use of messageWhenTooLong function in lightning input or textarea

What is the use of messageWhenTooLong function in lightning input or textarea. In practice, the lightning-input element appears to prevent the user from entering any characters beyond the number ...
Neeraj Rautela's user avatar
-2 votes
1 answer
659 views

Concatenate Label with static text and dynamic vales

I have a lightning input where I'd like to create a dynamic label. When I deploy this component I don't have any errors; however, the UI displays "Please enter the {item.fieldValue}" in the ...
user82573's user avatar
0 votes
1 answer
6k views

Lightning input of type text in LWC accepts blank space as input when set to required - how to get rid of it

<lightning-input type="text" name="masterLabel" class="validate" label="Enter the Master Label" value={masterLabelValue} onchange={handleMasterLabelChange} ...
Frank's user avatar
  • 3
0 votes
1 answer
3k views

Lightning input Toggle - LWC [closed]

I’m working with multiple toggles in a template for bucle and I’m trying to find a way to identify the specific toggle that is enabled/disabled, I can’t use something like this: this.template....
Senda Longeva's user avatar
0 votes
0 answers
512 views

How to display different input types(checkbox radio text) according to the user's preference in lwc

This is the current preview of my app where when i click a particular survey the corresponding question and answer is displayed.I want to modify the answers in such a way that answer type can be ...
user avatar
0 votes
0 answers
671 views

select lightning input checkbox by name in aura

I want to select the lightning input checbox by name from my Aura component controller. How can I do that? <lightning:input type="checkbox" label="{!parentBenefit.Name}" name=&...
Akash's user avatar
  • 361
0 votes
1 answer
500 views

Unable to set required attribute for lightning input

I'm currently looking to change the required attribute based on multiple scenarios. So, I have a created input field with the required attribute as newAccRequire but by default, it's getting the true ...
Pavan tej's user avatar
  • 1,460
1 vote
1 answer
934 views

Force capital letters in a lightning-input element

Is there any way to capitalize the letters from a lightning-input (type text) in html? I'm using this in a lightning-datatable and when a use insert a lowercase field, it's sorted before the capital ...
blanco17's user avatar
0 votes
0 answers
394 views

Is there a way to pass sobject record from html to lwc on radio button change

I am displaying list of contacts in table in lwc. I have a radio button placed in each row of the table. On clicking that, I'm able to send the contact record id but I want to send that particular ...
sfdcPal's user avatar
0 votes
1 answer
2k views

Lightning Input with: Read Only but with Borders

I have a Lightning component with a form. This form has some fields as Read Only and some others editable. I use Lightning input with the property readonly. The issue is that on the ones that are ...
Giorgos Galaios's user avatar
0 votes
1 answer
1k views

How to make https optional in lightning input type url in lwc

I want to make https or http optional in my url type input field. But I always get invalid format error. I've tried regex pattern as well, but no luck. HTML Code: <lightning-input type="url&...
sfMon's user avatar
  • 49
0 votes
1 answer
1k views

How to make input element read only on button click

<lightning-input value={value} class="slds-p-horizontal--xx-small" variant="label-hidden"></lightning-input> <lightning-input type="number" name="...
sfMon's user avatar
  • 49
0 votes
1 answer
2k views

Lightning:input required="true" is not working [closed]

I'm using a required field for an aura component that should does not save a record if any of required fields is missing. This is my input: <lightning:input aura:id="test" name="test&...
CPS's user avatar
  • 345
0 votes
1 answer
58 views

Extra textbox before input component

It seems that there's an extra textbox that I can type into, but I'm not sure what's causing it in the code. I only get to this extra textbox when tabbing through elements on the page. I have added ...
Greg's user avatar
  • 25
0 votes
1 answer
3k views

How to set maxlength for lightning-input-rich-text

How can we limit the number of characters entered in rich text field lightning field <lightning-input-rich-text value={myVal}> </lightning-input-rich-text> Is there any ...
AdityaHM's user avatar
  • 133
1 vote
1 answer
504 views

Control binding for aura attribute being passed from parent to child

I am taking record id and object name as input from user <aura:attribute name="recordidinput" type="Id" /> <aura:attribute name="objectname" type="...
Shreya Pandita's user avatar
-1 votes
1 answer
1k views

LWC Html table with lightning-input onchange giving error

I have a html table in my LWC child component which is populated from the parent. I am able to pass the values and display the data on the child component. On the child component the table has a ...
Rohit's user avatar
  • 11