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

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
330edb8dc8bbc5a824984cf46e941b2f?d=identicon&s=25 Tam Kbe (tkbeili)
on 2009-04-14 06:59

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
how can I pass non members through remote form?


330edb8dc8bbc5a824984cf46e941b2f?d=identicon&s=25 Tam Kbe (tkbeili)
on 2009-04-14 07: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.
This topic is locked and can not be replied to.