Questions tagged [lightninginput]
The lightninginput tag has no usage guidance.
154
questions
0
votes
1
answer
19
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=&...
0
votes
1
answer
30
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 ...
0
votes
1
answer
34
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={...
0
votes
1
answer
43
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 ...
-2
votes
1
answer
81
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 ...
0
votes
1
answer
804
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} ...
0
votes
0
answers
94
views
What's the difference between the "label-stacked" and "standard" variant of lightning-input?
For the lightning-input component, the variant attribute has 4 variations: "standard", "label-inline", "label-hidden", and "label-stacked".
"standard" ...
0
votes
1
answer
313
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....
0
votes
0
answers
151
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 ...
0
votes
0
answers
115
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=&...
0
votes
0
answers
48
views
Call javascript after page load complete
I want to disable some lighting input based on certain conditions in js on page load. But when I try to do temple.selectquery it returns null because the js is getting fired before page complete. Now ...
0
votes
1
answer
73
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 ...
1
vote
1
answer
167
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 ...
0
votes
0
answers
110
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
1
answer
544
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
1
answer
288
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
1
answer
102
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
1
answer
576
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
1
answer
28
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
1
answer
798
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
1
answer
86
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
1
answer
540
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
1
answer
134
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
2
answers
2k
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
0
answers
647
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
0
answers
60
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
0
answers
619
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
0
answers
159
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
1
answer
156
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
0
answers
42
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
1
answer
696
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 ...
2
votes
0
answers
32
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
1
answer
507
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 ...
1
vote
0
answers
310
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
1
answer
171
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
2
answers
1k
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
0
answers
30
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
1
answer
315
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
1
answer
601
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
1
answer
784
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
1
answer
103
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
1
answer
401
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
1
answer
180
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
0
answers
611
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
1
answer
2k
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
1
answer
3k
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
0
answers
60
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
1
answer
109
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
1
answer
4k
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
0
answers
23
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">
...