Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3278030
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:26:09+00:00 2026-05-17T19:26:09+00:00

I have the following form in my Rails application: <% form_tag password_resets_path, :id =>

  • 0

I have the following form in my Rails application:

<% form_tag password_resets_path, :id => 'recoverPasswordForm' do %>
  <label for="passwordRecoveryEmailAddress">Email Address:</label>&nbsp;
  <%= text_field_tag "passwordRecoveryEmailAddress" %>
  <%= submit_tag 'Recover' %>

  <br />

  <div id="forgotPasswordLoginLinkContainer">
    <a id="forgotPasswordLoginLink" href="/login">Login Instead</a>
  </div>
<% end %>

When this form is submitted, the page must reload. I would like to easily turn this form into an AJAX form, such that the form submits via AJAX, and a page reload does not happen.

I could do this easily using jQuery, hooking into the .submit() function. But, I am curious: does Rails provide some easy way to turn any given form into an AJAX form? Or, what’s the simplest (yet elegant) way possible? Maybe something like

<% form_tag password_resets_path, :id => 'recoverPasswordForm', :ajax => true do %>

I’m using Rails 2.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T19:26:10+00:00Added an answer on May 17, 2026 at 7:26 pm

    Yes, and you were close with your guess. Rails 3 allows you to do form_tag ..., :remote => true to let the form use AJAX if Javascript is available.

    See http://railsapi.com/doc/rails-v3.0.0/classes/ActionView/Helpers/FormTagHelper.html#M002483

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my Rails 3 application I have the following form: <%= form_tag(/lounge/add_new_message, :id =>
I have in my rails form the following code: <label>Fruit: </label> <%= f.select(:IST_FRUIT, [['Apple',
I have the following HTML generated by form_tag and select_tag in Rails: <form accept-charset=UTF-8
We have the following code working for a complex rails form with checkboxes. I'm
I have the following form and controller. <%= form_tag do %> <div> <%= label_tag
I have the following form: echo $this->Form->input('Person.name'); echo $this->Form->input('Person.phone'); echo $this->Form->input('Person.email'); echo $this->Form->input('Message.0.plainmsg'); echo
Learning rails and something smells a little funny. I have the following form for
I have the following drop down box in a form for rails: <%= f.select
I have created the following select using the option_groups_from_collection_for_select form helper in Rails as
I have a Rails 2.3 application. I currently have the following validations in my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.