Hi, I have a text form field that needs to be 5 characters long, I figure that a on field exit event would be the best choice to have a client script that will achieve this.
I have done a search and found on MSDN a Pad Left (MyString.PadLeft(20, "-"c) string function that will do what I want but when I put it into the Client Script event and test it the string isn't padded, no errors are displayed (either when the event fires or when deploying the solution), my client script is as follows.
txtMatterNo = PadLeft(5,'0')
I have also tried
txtMatterNo = txtMatterNo.PadLeft(5,'0')
Each with no apparent effect.
Has anyone got any ideas on how to have a left padding on a text field to always make the field 5 characters. I don't want to force the user to always enter the padding themself, I would prefer that the system does the padding automatically.
Thanks,
Matt