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

  • Home
  • SEARCH
  • 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 6903615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:56:51+00:00 2026-05-27T07:56:51+00:00

I am trying to create inline editing in a rails 3.1 project. I am

  • 0

I am trying to create inline editing in a rails 3.1 project. I am creating the form to edit the copy via ajax, then trying to send the edit via ajax as well.

However the form does not want to bind and form will not submit on the forms created via ajax.

does anyone now how to bind the form after it’s created

I use edit.js.erb to add the form:

$("#nutri_<%= @nutritioninfo.id %>").after('<%= escape_javascript(render(:partial=>'admin/products/nutrition_edit',  :locals=>{:nutritioninfo=>@nutritioninfo}))%>');

and the partial is like so:

$%tr.hidden.edit-nutri{ :class => cycle('odd', 'even', :name => "nutrition-hidden-rows"), :id=>"nutri_edit_#{nutritioninfo.id}" }
  = simple_form_for [:admin,site,product,nutritioninfo], :remote=>true do |f|
  %td &nbsp;
  %td= f.input :title,:label => false
  %td= f.input :parent_id, :as=>:select, :collection=>nutritioninfo.possible_parents,:label => false
  %td= f.input :per100g, :label => false
  %td= f.input :info, :label => false
  %td= f.input :highlight,:as=>:boolean, :label => false
  %td.edit= f.button :submit, t('admin.general.save').humanize
  %td.remove=link_to t('admin.general.cancel').humanize, "#", :remote => true, :class=>"cancel-toggle"

Anyone have an idea on how to bind the form?

  • 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-27T07:56:52+00:00Added an answer on May 27, 2026 at 7:56 am

    There could be few issues.

    First of all, maybe obvious but do you require jquery_ujs in application.js? If you don’t have any actions with remote: true, it could be the reason.

    Second does it even trigger the submit on form? Remember that when using ajax you must use ‘live()’ instead of ‘bind()’ or ‘action()’ because live will make bind on elements each time you reload the form (‘bind’ binds action only once).

    But if the submit goes on, and you don’t have any respond, then you probably must implement xhr request in controller just like Andre Dublin said.

    Good art on rails with ajax you could refer to Using Unobtrusive JS and AJAX with Rails 3 also maybe you should take a look at In place editing RailsCast ?

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

Sidebar

Related Questions

I'm trying to create a simple inline edit for a div box. When i
Im having a small problem, I'm trying to create an inline editing system with
I am trying create a 'live' view where our clients can edit the colors
I'm trying to create something almost similar to this [1]: http://weblogs.asp.net/infinitiesloop/archive/2007/09/17/inline-script-inside-an-asp-net-ajax-updatepanel.aspx The problem I
I am trying to create an application that will send out style-heavy emails and
I'm trying to create a user control template that I can send as email.
I am trying to create an inline chat. The problem arrives when two windows
I am trying create a WCF service that leverages the WPF MediaPlayer on the
I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can
I am trying create a delegate representation of constructor by emitting a Dynamic Method,

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.