Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

codejoy's Profile

GitHub User: codejoy

Comments by

Avatar

This is awesome, but what if I want the link_to to save the form data before it is clicked?

It seems wicked defaults to the form id to edit_put (maybe its a rails default?)

I cannot seem to over write this, but no matters since page per page i just want my link to save the data there, I thought I could call a submit action:

ruby
<%=  link_to "NEXT", next_wizard_path, :method => :put, :id => 'my-link-check' %>

And then the java script on the page is:

$(document).ready(function() {
$('#my-link-check').click(function(event){
var form = document.getElementById("edit_put");
if(form!=null)
form.submit();
});
});

But this seems to not submit (does if have a breakpoint in firebug, odd) and then if that submit does work it doesnt goto the next page...

our "Save Document" buttons on these pages do work, and are just
submits. So not sure what critical piece I am missing to make this work.