Forum: Ruby on Rails observe_field inside of a form?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Nick Wientge (Guest)
on 2006-04-25 01:22
(Received via mailing list)
Hi I've just started experimenting with AJAX in Rails and have come
across this issue.

I'm trying to set up some ajax form validation on a login form. I set
up an observe_field method for the username field but the action for
the containing form is being called and rendered instead of the
action I specify in the observe_field method.

All of the observe_field examples I've found are done using a single
input tag, no containing this the issue or is it something
else I'm missing?

<%= form_tag %>
<fieldset id="login_form">
	<p>Please Log In</p>
         <label for="user">Username:</label>
         <%= text_field("member", "username", "class" => "text
required", "id" => "username") %>
		<div id="username_verify"></div>
<%= end_form_tag %>

<%= observe_field :username, :frequency => 0.5, :update
=> :username_verify, :url => { :action => :verify_username } %>
This topic is locked and can not be replied to.