Try this:
local function fctTextFieldListener(oEvent)
if "began" == oEvent.phase then
-- First edition
elseif "editing" == oEvent.phase then
-- During edition
elseif "submitted" == oEvent.phase then
-- End of edition
end
end
local oTextField = native.newTextField( nX, nY, nWidth, nHeight)
oTextField:addEventListener( 'userInput', fctTextFieldListener )
You can access the oTextField text using oTextField.text :) In your case you would need to call your function either in the 'began' event if it's only on first edition, or 'editing' event on further editions.
Cheers