title: Simple form submit button not working when inside content_for
body: <p>I have created this form in rails using simple form with bootstrap:</p>
  
  <pre><code>&lt;%= simple_form_for @page, :html =&gt; { :class =&gt; 'page-form' } do |f| %&gt;
  &lt;div class="row"&gt;
  
      &lt;%= f.input :title, wrapper_html: { class: 'span6'}  %&gt;
      &lt;%= f.input :url, wrapper_html: { class: 'span3'}  %&gt;
      &lt;%= f.input :content, input_html: { class: 'wysihtml5 span9' }, wrapper_html: { class: 'span9 row' } %&gt;
      &lt;%= f.input :excerpt, input_html: { class: 'wysihtml5 span9 excerpt' }, wrapper_html: { class: 'span9 row'}  %&gt;
  
  &lt;/div&gt;
  
  &lt;% content_for :sidebar do %&gt;
    &lt;div class="page-header"&gt;
      &lt;h1&gt;Publish&lt;/h1&gt;
    &lt;/div&gt;
    &lt;div class="well"&gt;
      &lt;%= f.input :status , collection: Page::STATUS.map { |s| [s.humanize, s] }, prompt: '- Select page status -' %&gt;
        &lt;div class="form-actions"&gt;
          &lt;%= f.button :submit, :class =&gt; 'btn btn-primary' %&gt;
          &lt;%= link_to t('.cancel', :default =&gt; t("helpers.links.cancel")),
                      pages_path, :class =&gt; 'btn' %&gt;
        &lt;/div&gt;
    &lt;/div&gt;
  
  &lt;% end %&gt;
  
  &lt;% end %&gt;
  </code></pre>
  
  <p>The problem is that when the submit button is inside the <code>content_for</code> block it does not update the form when clicked. If i have the button outside this block it works.</p>
  
  <p>Is there any way to make it work inside to <code>content_for</code> block? i need it to be in  the side bar.</p>
  
  <p>Picture of desired result:<img src="https://i.stack.imgur.com/5itnO.png" alt="enter image description here"></p>
  
  <p>Any tips, answers or helpful comments are appreciated :)</p>