function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Matt UrbanowskiMatt Urbanowski 

Reading value from a Lightning Component Input Field

I have a Lightning Component with an InputField in it.
All I want to do is read the value of the field when it is changed.
So I have an onChange event on it which calls a function in the controller.
In the function, I can read the value by looking at 
event.ln.value
BUT - This doesn't seem correct to me as my component broke the other day, and I had to change the code to read "event.kn.value". This fixed it temporarily until it broke again and I had to change it back to "ln". What on earth is going on here? Is there a better way I should be looking up the value for this input field?
Matt UrbanowskiMatt Urbanowski
It changed again to "nn". Querying the field using jQuery for some reason returns a blank value from the controller, so the only way I have found is to write some code which searches the JSON stringified event object for the value attribute and extracting it from there. Not ideal, but I can't find any other way!