# Input controls on-the-fly?

**URL:** <https://www.ruby-forum.com/t/input-controls-on-the-fly/58422>\
**Category:** Rails\
**Created:** [April 21, 2006, 3:49pm UTC](https://www.ruby-forum.com/t/input-controls-on-the-fly/58422 "2006-04-21T15:49:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lepre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/919ad9/32.png) [@lepre](https://www.ruby-forum.com/u/lepre)\
**Post date:** [April 21, 2006, 3:49pm UTC](https://www.ruby-forum.com/t/input-controls-on-the-fly/58422/1 "2006-04-21T15:49:39Z")

</div>

i wish to know if there is some way to check user-input directly while  
it’s inserted.  
for example if i have to insert a number and the user press letters i  
just have to hide/delete the letters and wait for numbers.

all without the need to press some submit button or any link…just  
automatically.

Thanks  
Lepre

---

<div class="post-metadata">

**Author:** ![lepre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/919ad9/32.png) [@lepre](https://www.ruby-forum.com/u/lepre)\
**Post date:** [April 21, 2006, 4:36pm UTC](https://www.ruby-forum.com/t/input-controls-on-the-fly/58422/2 "2006-04-21T16:36:14Z")

</div>

lepre wrote:

> i wish to know if there is some way to check user-input directly while  
> it’s inserted.  
> for example if i have to insert a number and the user press letters i  
> just have to hide/delete the letters and wait for numbers.
> 
> all without the need to press some submit button or any link…just  
> automatically.
> 
> Thanks  
> Lepre

It’s called JavaScript. Do a Google search for JavaScript validation and  
you’re bound to find what you’re looking for.

---

<div class="post-metadata">

**Author:** ![lepre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/919ad9/32.png) [@lepre](https://www.ruby-forum.com/u/lepre)\
**Post date:** [April 21, 2006, 4:59pm UTC](https://www.ruby-forum.com/t/input-controls-on-the-fly/58422/3 "2006-04-21T16:59:05Z")

</div>

Bryan D. wrote:

> It’s called JavaScript. Do a Google search for JavaScript validation and  
> you’re bound to find what you’re looking for.

i know js but till now i only found validation after the submit button  
(that’s why i said it) and nothing about on-the-fly…

i posted here also to know if there something directly in rails or not

---

<div class="post-metadata">

**Author:** ![lepre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/919ad9/32.png) [@lepre](https://www.ruby-forum.com/u/lepre)\
**Post date:** [April 21, 2006, 5:12pm UTC](https://www.ruby-forum.com/t/input-controls-on-the-fly/58422/4 "2006-04-21T17:12:06Z")

</div>

lepre wrote:

> Bryan D. wrote:
> 
> > It’s called JavaScript. Do a Google search for JavaScript validation and  
> > you’re bound to find what you’re looking for.
> 
> i know js but till now i only found validation after the submit button  
> (that’s why i said it) and nothing about on-the-fly…
> 
> i posted here also to know if there something directly in rails or not

I’m no rails guru so I couldn’t tell you if there’s something in rails  
to do it automagically, but in JavaScript do something like -

[http://www.htmlcodetutorial.com/forms/index\_attsupp\_5.html](http://www.htmlcodetutorial.com/forms/index_attsupp_5.html)

---

<div class="post-metadata">

**Author:** ![lepre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/919ad9/32.png) [@lepre](https://www.ruby-forum.com/u/lepre)\
**Post date:** [April 22, 2006, 3:25am UTC](https://www.ruby-forum.com/t/input-controls-on-the-fly/58422/5 "2006-04-22T03:25:31Z")

</div>

OMG…i just got about RJS (ruby javascript)…that’s so nice…

---

<div class="post-metadata">

**Author:** ![lepre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/919ad9/32.png) [@lepre](https://www.ruby-forum.com/u/lepre)\
**Post date:** [April 21, 2006, 5:20pm UTC](https://www.ruby-forum.com/t/input-controls-on-the-fly/58422/6 "2006-04-21T17:20:50Z")

</div>

Adam Beale wrote:

> [http://www.htmlcodetutorial.com/forms/index\_attsupp\_5.html](http://www.htmlcodetutorial.com/forms/index_attsupp_5.html)

that open up the way 🙂  
thank you
