Forum: Ruby on Rails (no subject)

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.
0ac5fecd7d407e631702c84f17fb3b31?d=identicon&s=25 miles.wu (Guest)
on 2005-11-23 11:30
(Received via mailing list)
I have a Ajax.autocompleter text field, which is used for selecting
tags/labels. However, as you can have multiple tags/labels, the user (to
enter apple and fruit as tags) would enter ap, and then use the arrow
keys
to select apple and press enter. But as soon as the user presses enter
the
form gets submitted with only the one tag of apple.

Is there anyway of turning of the form submission on pressing of the
enter
key, or would I have to turn the text field into a text area, which
doesn't
care about enters? If I use some javascript to disable form submission,
wouldn't it interfere with the Ajax.autocompleter?

Thanks,

Miles
This topic is locked and can not be replied to.