Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [lightninginput]

The tag has no usage guidance.

13
votes
0answers
327 views

Cannot read property '$$OwnerKey$$' of null

I have a Visualforce Lightning Out page that's rendering some <lightning:input type="date"> elements. Since the Winter '19 release in the dev sandbox I'm working in, whenever I select a date ...
7
votes
1answer
3k views

<lightning:input type=“toggle”> how to set the slds-checkbox--on and the slds-checkbox--off span text

I am using lightning:input type="toggle" base component and I need to set the text underneath the toggle button. By default checked displays Active: And unchecked displays Inactive: Here is my code:...
6
votes
3answers
9k views

Lightning:input type=“date”: how to change the date fomat - Summer'18

I'm trying to change date format of this component but I dont find any attribute (like ui:inputDate has) to change the date format. <lightning:input type="date" name="input8" label="Dates" value="...
6
votes
2answers
4k views

Lightning:Input - Hide (Reset) Field Level Error message Enabled by using showHelpMessageIfInvalid()

Have few Lightning:Input and Lightning:Select components in My Component A. All the fields are having Required attribute as 'true'. Once fields are validated, Field level error (help) messages appear ...
6
votes
2answers
760 views

Did they break lightning:input with Summer'18?

I'm aware that it's still beta, but I didn't expect them to break it for older api versions :/ <aura:application extends="force:slds"> <aura:attribute name="myNumber" type="Decimal" ...
6
votes
0answers
276 views

lightning:input behaves strangely with Non-US(german/french) locale

In my app there are many users with a German or French locale. Both have in common that they use comma as decimal separator (opposed to Apex, JS and US-citizens which use a dot .) The dot instead is ...
5
votes
2answers
7k views

readonly property of lightning:input not working

I am using lightning:input of different types. Using readonly=true in input of type text is working but does not work for checkbox or for lightning:select. Anyone got any clue for this?
5
votes
2answers
275 views

Can we use lightning:input in production

<lightning:input value="{!v.selectedValue}" placeholder="{!v.placeholder}" readonly="true"/> Can we use the code above in SFDC production? I see that this input component is still in beta from ...
5
votes
1answer
1k views

lightning:input checkbox label with url

I have been tying to include "url/hyperlink" within a checkbox "label" using lightning input, but to no avail. Given is what I have tried and with the results, I want "Terms and Service" part of the ...
5
votes
0answers
192 views

How to handle percentage factor of 100 problems when using lightning:input and lightning:datatable?

When working on a bug, I just noticed that lighting:input now supports two percentage formatters, where the older one percent expects the user to know to enter e.g. 0.5 for 50%: <lightning:input ...
4
votes
2answers
3k views

lightning:input Clear validation error messages

I have enabled error messages (validation failed) for Lightning:input components inside my lightning component A using inputCmp.showHelpMessageIfInvalid() I am trying to clear the Lightning:input ...
4
votes
1answer
40 views

Lightning:input in Aura:iteration values aren't set

I am trying to create an array of String values in an lightning component using a List attribute: <aura:attribute name="keywords" type="List" default="['','','']" /> With multiple inputs: <...
4
votes
1answer
581 views

How to set currency code to <lightning:input type=“number” formatter=“currency”>

I am developing a custom currency field with lightning:input type="number" formatter="currency" component: <lightning:input type="number" formatter="currency" value="100" step="1"/> I have ...
3
votes
1answer
2k views

lightning:input (text) - is it possible to have multiple patterns

I have a field that checks for 2 patterns. What I currently have is, in the text field's onchange handler, i check if the inputted string matches a certain pattern. However, I want to use lightning's ...
3
votes
1answer
1k views

<lightning:input type=“toggle”> how to set the label above the input component

I am using lightning:input type=“toggle”, By default the label is displayed to the left of the component: Here is my code: <lightning:input type="toggle" label="My Label: " ...
3
votes
2answers
1k views

How to add lightning:input to lightning:recordEditForm

I'm building out a question answer component where certain answers will have specific input types and it would be nice to set some key parameters of the input field yet still use the lightning:...
3
votes
2answers
447 views

Lightning Input datetime prevent value issue

I am using a lightning:input to get a date/time value in the users Locale. If the user picks a date that is beyond today I need to prevent that value from being entered. I am able to catch this ...
3
votes
1answer
690 views

How can I use Lightning:input focus on init?

Not sure what am i missing here but trying few approaches but still having some issues and it doesn't work so far. How can I invoke the method focus on a ui input : cmp <lightning:input label="...
3
votes
2answers
891 views

Lightning:input type=“file” change the “Upload Files” text

I would like to change the text and the style of the "Upload Files" in the lightning:input. The style as far as I understand I would have to overwrite the slds class, but what about the text?
3
votes
0answers
2k views

Using Lightning input file

I've been using the lightning:input type="file" <lightning:input type="file" label="Attachment" name="file" multiple="true" accept=".docx, .doc, .xlsx, .zip" onchange="{! c.handleFilesChange }"/&...
2
votes
1answer
1k views

How do you dynamically update lightning:input type?

My assumption was that if any component data is changed, that the component will rerender, I want to change the type of the input field and have it rerender, but it's not doing that! <aura:...
2
votes
1answer
96 views

How can you get the caret position when working from an event?

Looking at the Locker documentation they list selectionStart as being a valid attribute, but I can't find a way to access it. I am trying to write an input masking utility, and everything works fine ...
2
votes
1answer
104 views

Error in Lightning Design System Input element on Mobile

I am using lightning:input out of the box component. I'm displaying an error message on the field using the standard functionality of the component. The error message is little long for Mobile but ...
2
votes
1answer
316 views

lightning:input customError in ValidityState

I'm looking at creating a file importer in lightning, and with the restrictions on file size I'm trying to create an error message to display when the file is over 1mB. If I log the ValidityState of ...
2
votes
0answers
232 views

Lightning:input[type=number] value attribute is string instead of number

I encountered a fascinating bug (or feature) in the lightning:input[type=number] component and I was wondering if any of you have had this problem before? I'll describe what happens: My lightning ...
2
votes
0answers
167 views

Input too long when firing a custom event

What I'm trying to do is, onblur of the amount field, the total amount event would fire and would update the parent component's total amount attribute. Im doing this so that the running total in the ...
2
votes
0answers
39 views

Are multiple object key levels supported in input components?

I am trying to use a <lightning:input> component to edit the Quantity field on an OpportunityLineItem object. The OpportunityLineItem object is contained within a Javascript Object as a key, so ...
1
vote
1answer
3k views

lightning:input style text-align:right; [closed]

i use in some of my component, and it render a label + and input element with default text aligned in the left, my need is to align text on the right (only of the input element), I can do that by ...
1
vote
1answer
3k views

lightning:input (date) change format to dd/mm/yyyy

The lightning input field has an attribute "pattern". What pattern should i use? I've already tried "mm/dd/yyyy" but it doesn't work.
1
vote
2answers
6k views

How can I set the width of a lightning:input type=“search” without using pixels?

so I need to use a lightning:input type="search" searchbar, and I also need to put a button to the right of the searchbar on the same line. e.g.: the issue is, the only way I could figure out to get ...
1
vote
1answer
769 views

lightning:input vertical alignment in table cell

Hi, I want to create a table in my lightning component. I created 2 lightning:input fields and want to change the vertical alignment to "middle" but it does not work. I tried to do the following: &...
1
vote
2answers
946 views

<lightning:input variant=“label-hidden”> input does not take whole parent width

when I use : <aura:application extends="force:slds" > <div> <lightning:input type="text" label="myLabel" name="withLabel" value="withLabel" /> </div> </aura:...
1
vote
1answer
622 views

Enable lightning button on value entered

I have two lightning:button and a lightning:input field. What I have seen in some places is that. Some buttons are enabled only when values are entered in the text boxes. Is this achievable in ...
1
vote
2answers
829 views

Firefox specific UI issue with lightning:input when required attribute is true

I am having this strange issue in Firefox that on load of my component, the following field is automatically bordered red without performing any action as: The border goes away when I enter something,...
1
vote
0answers
17 views

Spell check doesn't work well in lightning input rich text

I'm having a lightning out app in which I'm having a custom rich text field. When I try to correct the spelling for the misspelled words, it's stripping out the entire line instead of correcting the ...
1
vote
1answer
46 views

How to upload files to a related record using lightning components?

I'm trying to upload a file to a related record using just the <lightning:input> component. The <aura: component> includes the force:hasRecordId and by using {!v.recordId} I am able to ...
1
vote
0answers
250 views

Issue with Lightning:input and currency formatter

I'm creating a lightning component with a lightning:input, but I have an issue with decimal places and currency formatter. This is my code: <lightning:input name="foo" value="foo" type="number" ...
1
vote
2answers
7k views

How to Validate single Lightning:input field? [closed]

I have only one input Field in my Component i.e lightning:input aura:id="AccId" label="Enter Account Name" name="SearchAccount" value="{!v.searchtext}" placeholder="Search for an Account.../><...
1
vote
1answer
1k views

Question about pattern of lightning:input

how i can have a field (lightning:input) in which i can write 3 integer and 3 decimal? Something like 123.456 (max 3 integer and max 3 decimal, with "." or "," between integer and decimal). I try to ...
0
votes
1answer
461 views

Pass text value of lookup to jscontroller

I have a lookup component in lightning. The parent component code snippet <th class="slds-align-bottom"><c:LookupCmp objectName="User" field_API_text="...
0
votes
1answer
915 views

Lightning:input label attribute not rendered when type=“checkbox-button”

While checking the lightning:input documentation, I wanted to test out the checkbox-button type attribute only to find out that the label is not rendered when using it: <lightning:input type="...
0
votes
2answers
689 views

Make lightning:inputRichText length longer

Is there a way for the lightning:inputRichText to make its size and length longer? Updated: I've already put a style of .THIS .lightningInputRichText { height: 500px; } But as you can see, ...
0
votes
1answer
2k views

force:inputField error: AuraRuntimeException: Error Retrieving Field

I am getting the above error with this component, which is used as an action override on the Account object: <aura:component implements="lightning:actionOverride,force:hasRecordId,flexipage:...
0
votes
2answers
4k views

lightning:input type=“radio” result binding

How can I bind attribute to result of lightning:input type="radio" I have tried the following <aura:attribute name="colors" type="String[]" default="Red,Green,Blue"/> <aura:attribute name="...
0
votes
1answer
27 views

Display spinner on lightning:input type=“search” field

At the moment I have spinner next to my search field, but it's wonky. What is preferred way to display spinners for search fields? Current solutions is... Essentially I want something similar that'...
0
votes
1answer
57 views

Action failed: c:DateValidation$controller$doAction [inputCmp.showHelpMessageIfInvalid is not a function]

I trying to validate ui:inputDate along with lightning:input of type Date. But I'm getting the error as Action failed: c:DateValidation$controller$doAction [inputCmp.showHelpMessageIfInvalid is ...
0
votes
1answer
434 views

how to format date in lightning components [duplicate]

I'm using lightning input of type date in my lighting component. Once the date is selected it is showing date as **Feb 12, 2019 ** But we want the date to be shown as MM/DD/YY. is it possible Here is ...
0
votes
1answer
183 views

Lightning input showing valueMissing error with non-null value in Edge browser

On a button press, I am attempting to validate my Lightning input fields before taking an action. For fields marked as required, I am validating that the input field has a value with something like: ...
0
votes
2answers
2k views

Lightning Component File/Image Upload and having it show up in Notes & Attachments

I am trying to pop open a modal form with an input to upload a documentation image on it. Everything else on the form is working perfectly fine, I just had a last minute ask to add this file input ...
0
votes
1answer
981 views

How can I dynamically set the focus on a lightning:input? [closed]

So I want to be able to set the focus on a lighting:input searchbar as soon as a tab is clicked, but I can't figure out how to target it. In javascript I could just do document.getElementById("someId")...