We changed our privacy policy. Read more.

Questions tagged [lightninginput]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
19 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 ...
0
votes
1answer
28 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 ...
0
votes
1answer
34 views

Is it possible to get input value directly when user click on it?

Problem: I have an input field and need to retrieve the value when the user clicks on it so I can filter my array and upsert my record. For the moment, it's possible to retrieve the value with the ...
0
votes
1answer
31 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&...
0
votes
1answer
26 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="...
0
votes
1answer
28 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&...
0
votes
1answer
27 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 ...
0
votes
1answer
149 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 ...
1
vote
1answer
57 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="...
-1
votes
1answer
116 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 ...
0
votes
1answer
73 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 ...
1
vote
2answers
265 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
233 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
33 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
54 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
131 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
29 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
155 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
39 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
57 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
30 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
130 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
35 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
27 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
144 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
88 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
29 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
543 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
18 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
116 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 ...
1
vote
1answer
291 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
324 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
38 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
147 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
49 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
204 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-...
1
vote
1answer
789 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
1k 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
33 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
58 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
1k 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
405 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
178 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
306 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
412 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
249 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
232 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
703 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
179 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 ...