Archive

Tag Archives: forms

local function handlerFunction(event)
    if event.phase == "submitted" then
        local enteredText = editField.text
        --enteredText now has the value of the text field.
        print(enteredText)
        native.setKeyboardFocus(nil)
    end
end

local editField = native.newTextField( 10, 125, 300, 36, handlerFunction )
--This sets (prefills) the text field value.
editField.text = "some pre-filled text"
Advertisements
%d bloggers like this: