# Problem with createTextField

**URL:** <https://forum.kirupa.com/t/problem-with-createtextfield/65763>\
**Category:** Uncategorized\
**Created:** [September 29, 2004, 12:10pm UTC](https://forum.kirupa.com/t/problem-with-createtextfield/65763 "2004-09-29T12:10:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shvalb](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@shvalb](https://forum.kirupa.com/u/shvalb)\
**Post date:** [September 29, 2004, 12:10pm UTC](https://forum.kirupa.com/t/problem-with-createtextfield/65763/1 "2004-09-29T12:10:25Z")

</div>

Hi.

I’m interested to create textFields dynamically, but I don’t know how to make this code working, can someone please help me to understand what do I have to put in my code at line 4 in the brackets ?? in order it to work.

btw: if the variable “losingdate” in my code is achieved from asp file, is this line: this.New1.text = losingdate; is a valid thing to do ??

for(i=1; i \< 5; i++) {  
this.createTextField(“New” + i, this.getNextHighestDepth(), 0 , 0, 100, 20);  
this.New1.border = true;  
this.(New+i).text = losingdate;  
???  
}  
Thanks alot.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 29, 2004, 12:13pm UTC](https://forum.kirupa.com/t/problem-with-createtextfield/65763/2 "2004-09-29T12:13:29Z")

</div>

```auto
for(i=1; i < 5; i++) {
this.createTextField("New" + i, this.getNextHighestDepth(), 0 , 0, 100, 20);
this.New1.border = true;
this["New"+i].text = losingdate;
}

```

Here you go 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 29, 2004, 12:18pm UTC](https://forum.kirupa.com/t/problem-with-createtextfield/65763/3 "2004-09-29T12:18:19Z")

</div>

if this works -\> you are my HERO!
