I have a form tag originaly generated using form_remote_tag. After a lot of bewildered testing to see why its values arent being passed on, I realised when looking at the html output that the form has a closing tag on the end (before the form fields).
So I thought maybe its a rails bug, and copied and pasted the generated version back into my rhtml file, commenting out the original helper call. Still the same. Tried reordering things in the page. No joy. I ran a test on another form in the page to check I hadnt lost the plot, and that worked fine.
Any help much appreciated!
Here is my rhtml code:_____________________________________________________
<form action="/invoice/filter_render" method="post" onsubmit="Element.show('spinner'); new Ajax.Updater('invoice_list_tbody', '/invoice/filter_render', {asynchronous:true, evalScripts:true, onSuccess:function(request){Element.hide('spinner')}, parameters:Form.serialize(this)}); return false;"> <%#= form_remote_tag(:update => "invoice_list_tbody", # :before => "Element.show('spinner')", # :success => "Element.hide('spinner')",
# :url => { :action => :filter_render }) %> <tr> <td>Date</td> <td> <input type="hidden" id="hiddenval" name="hiddenval" value="test"/> <select id="date_dropdown" name="date_dropdown"> <option value="all">All</option> <option value="issued">Issued</option> <option value="due">Due</option> <option value="received">Received</option> </select> </td> <td>From</td> <td> <input type="text" name="f_date_a" id="f_date_a" /><button type="reset" id="f_trigger_a">...</button> </td> </tr> <tr> <td></td> <td></td> <td>To</td> <td><input type="text" name="f_date_b" id="f_date_b" /><button type="reset" id="f_trigger_b">...</button> <%= submit_tag "Show date range" %></td> </tr> </form>