Questions tagged [lightninginput]

The tag has no usage guidance.

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

Lightning component aura lightning input

Need help! i must pass value from aura component(lightning input) in apex controller and update my account List! when i click "Edit" opened modal window with real data! i need edit this data ...
-4
votes
0answers
33 views

Pass values from lightning input in apex controller

Need help! i must pass value from aura component(lightning input) in apex controller and update my account List! when i click "Edit" opened modal window with real data! i need edit this ...
0
votes
0answers
54 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
0answers
34 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
0answers
32 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
1answer
28 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
1answer
69 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
0answers
27 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
129 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
111 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
32 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
189 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
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
1answer
418 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
60 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
287 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
79 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
735 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
415 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
40 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
93 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
372 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
46 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
230 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
74 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
89 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
250 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
49 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
28 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
304 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
0answers
158 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
72 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
855 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
19 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
190 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
445 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
560 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
46 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
238 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
85 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
367 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
1k 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
2k 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
35 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
62 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
2k 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
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"> ...
0
votes
1answer
466 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 ...