Expand my Community achievements bar.

SOLVED

NULL automatically entered for some reason??

Avatar

Level 4

I have a form that has a first name, middle name, and last name in seperate fields. I have the following code in as an exit event to make the first letter of the word captialized:

this.rawValue = util.printx(">?<*",this.rawValue);

It works great, BUT, if the user TABs away from the field by mistake the word NULL automatically gets entered....is there some more script I can enter or a setting I can change to make the NULL not to be entered automatically?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

That was really excellent script from BR001 (I am keeping that on file!!).

You could wrap the script in an if statement that checks the value of the object first.

if (this.rawValue != null)

{

     this.rawValue = util.printx(">?<*",this.rawValue);

}

Good luck,

Niall

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

Hi,

That was really excellent script from BR001 (I am keeping that on file!!).

You could wrap the script in an if statement that checks the value of the object first.

if (this.rawValue != null)

{

     this.rawValue = util.printx(">?<*",this.rawValue);

}

Good luck,

Niall