title: What should I do to accomplish this feature?
body: <p>So I have a form that is for adding topics (tags) to videos:</p>
  
  <pre><code>&lt;%= form_for @video, :url =&gt; {:action =&gt; "update"}, :remote =&gt; true do |f| %&gt;
    &lt;div class="field"&gt;
    &lt;%= f.text_field :topic_names, :class =&gt; "topic_field" %&gt;
    &lt;/div&gt;
    &lt;%= f.submit "Add Topic" %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>However, I want the form to initially not be there and appear only after a user clicks a link. Initially I wanted to load in the form from a different file with jQuery with this code:</p>
  
  <pre><code>$("#edit_topics_link").click(function(e){
          e.preventDefault();
          $(".topic_form").load("topic_form.html.erb");
          $("#edit_topics_link").hide();
      });
  </code></pre>
  
  <p>The problem with this is that the second I remove the form from its original view, I get this JS error: <code>Uncaught TypeError: Cannot set property '_renderItem' of undefined</code></p>
  
  <p>I think this might have something to do with the fact that the form is handled with an AJAX request since I pass the <code>:remote =&gt; true</code> option to it.</p>
  
  <p>Anyway, because of this error, I'm thinking of just keeping the form in the view and hiding it, and then showing it when the user clicks the link. Is this a bad idea? If I should be loading in the form, how can I prevent that JS error?</p>