Re: 2 Newb Questions

Alex Wayne
Mon, 26 Feb 2007 05:04:18 -0000

Xavias wrote:
>>   <%= form_remote_tag ... %>
>>     <%= hidden_field :post, :id %>
>>
>
> what would the exact syntax be though?
>
>     <%= form_remote_tag :url => {:action =>
''newlist'', :store => ?,
> :today => ?}, :update => ''mainfrm'',
>   :complete => visual_effect(:bind_down, ''mainfrm''),
>   :before   => %(Element.show(''spinner'')),
>   :success  => %(Element.hide(''spinner'')) %>
>
> i set the below hidden values dynamically
>
>     <input type="hidden" name="hiddenstore"
id="hiddenstore" value=""/>
>     <input type="hidden" name="hiddendate"
id="hiddendate" value=""/>

Do you want those variables to be in the url? or in the data from the
form?  If you want them in the form data then use hidden fields.

  <%= form_remote_tag :url => {:action => ''newlist''},
...other
options... %>
    <%= hidden_field_tag :store, my_spiffy_variable %>
    <%= hidden_field_tag :today, Time.now.to_s(:db) %>
    <%= other form fields %>