Questions tagged [lightninginput]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
12 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
24 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
26 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
0answers
24 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
51 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
20 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
22 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
125 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
80 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
74 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
64 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
80 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
30 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
63 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
0answers
15 views

Get all lightning inputs with given type

Is it possible to access all of the lightning inputs of given type? I mean something more generic than getting them by aura:id
0
votes
1answer
113 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
45 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
142 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 ...
0
votes
0answers
87 views

Focusing on first lightning input with error in LWC

I have number of Lightning input fields in my component. If there is any error in input from user, On submit of form, I want to move the focus onto the first erroneous Lightning input. In the ...
1
vote
1answer
93 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
143 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
0answers
76 views

Arrows hidden in lightning:input number?

someone knows why the arros in the lightning input number disappeared, and how can I put in again? grettings
0
votes
1answer
59 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 ...
2
votes
1answer
298 views

Lightning-input currency not working properly as of Spring 20'?

Hi I refreshed my org in order to have the latest changes from Spring 20' release, and I noticed a change in the input type currency when I try to type the decimal value separated by a dot ('.'), it's ...
0
votes
4answers
2k 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
100 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
138 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
156 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 ...
2
votes
1answer
275 views

Is it possible to conditionally set the value of an input component?

I tried to create an input component as follows: <aura:attribute name="dataTotal" type="Map" /> <aura:attribute name="myBoolean" type="Boolean" /> <lightning:input type="number" value=...
0
votes
3answers
104 views

Disable a toggle if is checked

Is it possible to disable a toogle if is checked ? <lightning:input type="toggle" name="togglevalue" checked="false" messageToggleActive="ok" messageToggleInactive="not ok" disabled="{!if ...
0
votes
1answer
53 views

Is there a way to zoom in on a text input field?

Say I have an lightning input field in a table that looks like this in HTML. <td><lightning-input key={row.key} data-key={row.key} value={row.aucNotes2} onblur={handleRowAction} name='...
0
votes
2answers
134 views

Pass multiple values from Lightning radio

I need to pass mutiple values to Lightning radio button onChange function. Here's my code; <aura:iteration items="{!v.records}" var="rec"> <tr class="slds-hint-parent"> ...
0
votes
2answers
1k views

Regex for string but at least one character must be a number of letter [closed]

I have a lightning input component and I need the input values to be only alphanumeric characters, underscores and/or spaces. However, there is also one more requirement to have at least one number or ...
3
votes
2answers
295 views

LWC: Wait until property propagates down containment hierarchy

I'm working on a Lightning Web Component form where child components contain input fields. These components can be expanded to see all the fields, or collapsed to save space. So far, so good. The ...
0
votes
2answers
686 views

Unable to set Text Alignment for lightning-input (Number) LWC component

I am using lightning-input of type number (LWC) and trying to have input text center aligned. At the end, element's class is being set to "slds-input", So I cannot use custom class to add css. I am ...
0
votes
1answer
219 views

Required attribute not working lightning:input rerender

I am facing an issue with below code. Required attribute on lightning:input is not working on rerender. I have an inputCheckbox and I render the lightning:input field upon checkbox selection. This is ...
0
votes
1answer
713 views

Lightning-input label font size too small on mobile

I create a visual force page with a lightning web component form. The problem I have is that the input labels are too small on a mobile. The visual force page: <apex:page showHeader="false" ...
3
votes
1answer
111 views

Modify LWC component styles

I came across a requirement where I wanted to change the width of the Date & Time pickers of the <lightning-input></lightning-input> LWC component from component library. It took ...
0
votes
3answers
719 views

Lightning: Stop page refreshing WHEN Enter key is pressed

I am using the ui:inputtext for lightning component. When the user hit enters the page refreshes. Is there anyway to stop it from doing that. Cmp <aura:component controller="MovieController"> ...
0
votes
1answer
432 views

lightning:input type=“file” not working

I'm working with a lightning custom component that needs to load files and handle them in back controller. I have this definition of lightning:input: <lightning:input type="file" label="{!$Label....
3
votes
3answers
147 views

How to implement Auto-date functionality in the Lightning JS

I would like to show the auto date format like mm/dd/yy...with auto add /. I would like to implement exact same functionality shown in the below example from Fiddle. Here is the example: Fiddle.
1
vote
1answer
513 views

Placing asterisk to to Lightning:input fields in LWC

I am trying to add a double asterisk to lightning:input tags in LWC, by using "required" tag inside the tag i am able to see the asterisk, but two issues with this is i have to show double asterisk to ...
1
vote
1answer
1k views

Lightning-input - Date/Time - Min and Max [closed]

In this: <lightning-input type="datetime" name="EventStartDateTime"> How do I set the min and max values for time ( 06:00 to 11 pm ) and Date (Min: Today and Max: Today +10 years) ?
0
votes
1answer
3k 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
324 views

Add custom validation when table is loaded in LWC

I have a table with few columns. I have to add validation based on first two columns. First column is "Model Number" and second is "Part Number". I am using html table with "for:each". And data is ...
0
votes
1answer
79 views

validation after data is imported through .csv in lighnting web componet form

I made a UI, where i am taking inputs inside loop. I have four columns. First column is Model number and second column is Part Number(read only). When they enter model number i am calling class and ...
0
votes
1answer
193 views

Bind inputs to array of objects in js file

I am new to LWC. I ma made a UI, where i am taking inputs in array of objects. But i am not able to map those values in the JS file. I know how to do for single input, but not sure how to do for list ...
0
votes
1answer
693 views

lightning-input validation inside loop

I am new to lightning web component. I was trying to create a table where i take input of new records. I am putting one field for now, for simplicity. <template for:each={allrecords} for:item='...
0
votes
1answer
109 views

Lightning:input required always true

I have a lightning component like the below, <aura:component description="GDPR_Settings_Configuration" implements="force:appHostable"> <aura:attribute name="gdprSetting" type="Object" ...