Wednesday, 7 August 2013

Detecting each character inputed in field and run conditionals

Detecting each character inputed in field and run conditionals

I am building a Ruby on Rails app. I believe it will be easiest if I try
to explain what I want the user experience to look like before I ask my
question.
I want my user to go on my site and begin to type in a text field. When
each character is inputted, I want to run a conditional statement on that
character to decided if it should be added to the text field. If the
character inputted is not one I want, the character isn't added.
I have validations in my model to do this after the text is submited, but
I want it to be real time. I'm guessing this relates to JavaScript and I
am not comfortable enough in coding it to know what to search
for/research. Can you assist me in where to look (Tutorials, Concepts,
etc)?
Thank you for taking the time to read this.

No comments:

Post a Comment