Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How can I set a text field to convert all text entered to proper case when populated within the same textfield?

Avatar

Avatar
Level 1
Michelle3799
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
Michelle3799
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
Michelle3799
Level 1

14-07-2015

I am trying to get the entered text to auto change to Proper case within the same field. I started with the following script and it doesn't work.  Can you please review and advise.  thank you.


topmostSubform.Page3.Lastname::exit - (JavaScript, client)

  Lastname.rawValue=js.capitalizeEachWord(this.rawValue);

topmostSubform.#variables[0].js - (JavaScript, client)

function capitalizeEachWord(str)

{

  var words = str.split("");

  var arr = Array();

  for(i in words)

  {

      Lastname = Lastname.chrAt(0).toPropperCase()+Lastname.substring(1);

    arr.push(Lastname);

   }

   return arr.join("");

  }

Accepted Solutions (0)

Answers (0)