Forum: Ruby on Rails passing non-model members through remote form

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Tam K. (Guest)
on 2009-04-14 08:59
Hello,

I have the following remote form:

<% remote_form_for :sms_message, @the_message,
                 :loading  => "",
                 :complete => "",
     :html => { :method => :post},
    :before => "if (!validate_submit_msg_form()) {return false;} ",
  :url => {:controller => "sms",
    :action => 'send_the_message',
    :recipients_session_id => @recipientSessionID} do |f| %>
<%= f.radio_button :now_or_later, "now", :onclick =>
"enable_or_disable_date_select(false);", :checked => true %>

<%= f.text_area :body, :size => "38x5", :class => "textAreaStyle",
:onkeyup => "calculate_msg_char_counter();", :id =>
"the_message_textarea" %>

<% end %>

The text area value gets passed correctly but not the radio button.
Knowing that :body is part of :sms_message model and :now_or_later is
not?
how can I pass non members through remote form?

Thanks,

Tam
Tam K. (Guest)
on 2009-04-14 09:42
I resolved the issue. It was something I was doing wrong with nesting.
The form beginning tag was at the beginning of <td> tag and the form end
tag was after end of the table </table>. so for some reason the
resulting HTML had </form> tag right before the </td> of the same <td>
the form started on! I moved the form beginning tag to before the
<table> tag so it included the other fields.
Thanks,
Tam
This topic is locked and can not be replied to.