Is there a way to pre-populate text field in corona

I have two screens.

First one has texts displayed and an “edit” button.

When I click the “edit” button

Second page with same amount of text fields will show up with pre-populated texts from the previous page, then I can do the editing.

Is there any ways to do this?

Assuming your native.newTextField is called “textField”

textField.text = “Some string”

Thank you. It works.

My question is, Is there any way to make that text disappear once your select the TextField, or at least make it all selected upon tapping on the field.

The idea being that you don’t need to delete the predefined text in the field.

The text field should generate an event when the field is tapped.  During that event, you can set the event.target.text = “” to clear the string.

Rob

Thanks, I’ll give it a try.

James

That worked perfectly. . Thanks

Assuming your native.newTextField is called “textField”

textField.text = “Some string”

Thank you. It works.

My question is, Is there any way to make that text disappear once your select the TextField, or at least make it all selected upon tapping on the field.

The idea being that you don’t need to delete the predefined text in the field.

The text field should generate an event when the field is tapped.  During that event, you can set the event.target.text = “” to clear the string.

Rob

Thanks, I’ll give it a try.

James

That worked perfectly. . Thanks