Expand my Community achievements bar.

SOLVED

Preventing commas and hard returns in text field

Avatar

Level 1

I need to prevent the use of commas and hard returns within a text field in my form. I currently have working code that prevents the use of commas but now need to prevent the hard return.

This is what I have currently:

 

VSC.File.Justification::change - (JavaScript, client)

xfa.event.change = xfa.event.change.replace(/,/g,"");

Thanks for helping!

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

to prevent several characters you can use a few methods that will work.

or

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

Hi,

to prevent several characters you can use a few methods that will work.

or