"How to do it" is a particularly reasonable question in this case since looking up "field" in the dictionary doesn't point to mobileControlCreate, mobileControlSet or mobileControlGet(). While it does show the native field Widget objects, and the Android one does seems pretty comprehensive, neither of them point to mobileControlCreate, mobileControlSet or mobileControlGet() either.
LiveCode has a lesson for creating native mobile text fields:
https://lessons.livecode.com/m/4069/l/2 ... -on-mobile
Below is a brief overview.
To create a native field in iOS or Android use the command: mobileControlCreate. There are two kinds of mobile fields.
mobileControlCreate "input", "YourFieldName" -- this field allows a single line
mobileControlCreate "multiline", "YourFieldName" -- this field allows multiple lines
To set properties of the field look up the command: mobileControlSet
examples:
mobileControlSet "YourFieldName", "visible", true
mobileControlSet "YourFieldName", "rect", "20,20,200,50"
To get the content of the field use the function: mobileControlGet()
put mobileControlGet("YourFieldName", "unicodeText") into tUnicodeText
In order to get the dictation to work the user will need to tap the microphone icon that comes up with the mobile keyboard once the field is active.
This field object is native to iOS and Android, so it cannot be used in the IDE or desktop standalone apps. Sadly, you will also need to keep from triggering code which touches these "mobile only" commands and functions when you are not running on mobile because they will cause a script error outside of a mobile OS. So something like:
if the environment is "mobile" then
mobileControlCreate "input", "YourFieldName"
mobileControlSet "YourFieldName", "rect", "20,20,200,50"
end if