How to create a dynamic text field