Forum: Ruby on Rails Masked Input Fields?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Kevin M. (Guest)
on 2006-04-14 17:23
(Received via mailing list)
Fellow Rails Enthusiasts?

Does Ruby on Rails have a form helper function to create a masked text
input
field?  For example, a mask for entering a phone number might look like:

(   )   -


Also, does RoR have a function to set the focus to the first form field
on a
page?  I usually use the following JavaScript function:

function FieldFocus() {
    if (document.forms.length > 0) {
        document.forms[0].elements[0].focus();
    }
}

along with:

<body onLoad="FieldFocus()">

But, if Rails comes with similar functionality built in I'd rather do it
the
Rails way.


Kevin
http://www.RawFedDogs.net
http://www.WacoAgilityGroup.org
Bruceville, TX
This topic is locked and can not be replied to.