you are here: codestackercodes [RSS] → tag form_remote [RSS]

validation client-side with form_tag and form_remote_tag

create your javascript validate function and call in your form

<% form_tag "/login", :onsubmit => 'return validate(this)' do %>
    <!-- your form -->
<% end %>

<!-- or -->

<% form_remote_tag :url => "/login", :update => 'temp', :before => 'if( !validate(this) ) return false' do %>
    <!-- your form -->
<% end %>
Displaying 1 Code