Home Analyst Portal
Options

Restrict Input to a Single Line

Saleh_OwenSaleh_Owen Customer IT Monkey ✭
edited March 2019 in Analyst Portal
Does anyone know how to restrict a user's input to a single line?

When adding a text prompt to an Advanced Request Offering form, the portal renders this as a textarea element which allows multi-line text to be entered. We have a particular form where some users are pressing enter instead of tab to switch between prompts and this is causing some confusion. In IE once they press enter, the textarea jumps to a new line which makes the prompt appear to be empty again unless they scroll up, so they are entering their text again.

I know this is more of a training issue, but I was curious to find a way to prevent this from happening. I have started playing around with some JavaScript and trying to use .replaceWith('<input>'), but haven't been successful so far. I'm sure I can figure it out eventually, but I'm hoping someone else has already dealt with this.

Any help is appreciated.
Sign In or Register to comment.