How can the input event handler modify field text?

I have a form with several fields. On smaller devices all the fields do not fit above the soft keyboard that the device displays. To make it easier to fill out the form I automatically move to the next input field when then user presses enter. This works great. Unfortunately, since some of the fields are hidden by the device’s soft keyboard, they cannot see the prompt that is displayed with the field. To provide the user guidance, I have initialized the field with the prompt text and use a light grey color. When they type the first character in the field, I want to change the text in the field to just the one character they entered. I have tried setting event.text - that does not work. I have tried setting the field object (e.g., with kb = display.newTextField(…), setting kb.text = event.newCharacters). Doing the kb.text = event.newCharacters corrects what is displayed but has the side effect of positioning the cursor at the beginning of the text rather than at the end of the text, which truly makes no sense to me at all as the position of the cursor at the end of the prompt string was much greater than the one new character that was entered. I have tried setting event.startPosition but that seems to have no effect.

At this time I am using a separate function that removes and redisplays the input field (e.g., kb:removeSelf(); kb = native.newTextField()) that I kick off with a timer.performWithDelay at 100ms. This is working but ugly and I worry about slow devices, etc. I eventually forsee other problems if I want to do auto complete on data entry as well.

Does anyone know how to have the keyboard input event handler interact with the content of the text field?

Thanks,
[import]uid: 117477 topic_id: 21831 reply_id: 321831[/import]