# Format dynamically named text field

**URL:** <https://forum.kirupa.com/t/format-dynamically-named-text-field/173036>\
**Category:** Uncategorized\
**Created:** [December 20, 2005, 4:43pm UTC](https://forum.kirupa.com/t/format-dynamically-named-text-field/173036 "2005-12-20T16:43:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sparky\_J](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@Sparky\_J](https://forum.kirupa.com/u/Sparky_J)\
**Post date:** [December 20, 2005, 4:43pm UTC](https://forum.kirupa.com/t/format-dynamically-named-text-field/173036/1 "2005-12-20T16:43:38Z")

</div>

For some reason I can not pass formatting to dynamically created text fields, here’s the code:

createTextFields(0,0,“classDate\_txt”);

function createTextFields(newX,newY,newName){  
this.createTextField(newName,this.getNextHighestDepth(),newX,newY,500,40)  
newName.type = “dynamic”;  
newName.html = true;  
newName.border = true;  
newName.borderColor = 0xFF0000;  
newName.autoSize = true;  
newName.textColor = 0x000000;  
newName.wordWrap = true;

}

If I change newName to classDate\_txt, it works. I trace newName and it shows up as classDate\_txt. What is going on here?
