title: ruby on rails -- form table
body: <p>This is my table:</p>
  
  <pre><code>index.html.erb:
  
  
  
    &lt;center&gt;&lt;table border="1" cellspacing="0" cellpadding="10" id="c"&gt;&lt;/center&gt;
      &lt;h3&gt;&lt;center&gt;List Of Products&lt;/h3&gt;&lt;/center&gt;
  
      &lt;tr&gt;
      &lt;th&gt;S.No&lt;/th&gt;
      &lt;th&gt;Products&lt;/th&gt;
      &lt;th&gt;Availble Quantity&lt;/th&gt;
      &lt;th&gt;Price(each per kg/qua)&lt;/th&gt;
      &lt;th&gt;Quantity Requried&lt;br&gt;(enter required qua as per kg/qua)&lt;/br&gt;&lt;/th&gt;
      &lt;/tr &gt;
      &lt;% @product.each do |product| %&gt; 
  
      &lt;tr&gt;
      &lt;td&gt;&lt;center&gt;&lt;%= product.id %&gt;&lt;/center&gt;&lt;/td&gt;
      &lt;td&gt;&lt;center&gt;&lt;%= check_box_tag "name" %&gt; &lt;%= product.name %&gt;&lt;/center&gt;&lt;/td&gt;
      &lt;td&gt;&lt;center&gt;&lt;%=product.quantity %&gt;&lt;/center&gt;&lt;/td&gt;
      &lt;td&gt;&lt;center&gt;&lt;%= product.price %&gt;&lt;/center&gt;&lt;/td&gt;
      &lt;td&gt;&lt;center&gt;&lt;input type= "text" style="width:50px;"&gt;&lt;/center&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;% end %&gt;  
      &lt;/table&gt;&lt;br&gt;&lt;br&gt;
      &lt;%= link_to "ADD",checkout_index_path, class: "btn btn-small btn-primary" %&gt;
  </code></pre>
  
  <p>My question is, if I select any of the checkbox it should display the selected field in next page(i.e:index.html.erb/checkout)</p>
  
  <p>my index.html.erb/checkout page:</p>
  
  <pre><code> &lt;p id="notice"&gt;&lt;%= notice %&gt;&lt;/p&gt;
      &lt;h5&gt;Slected products are:&lt;/h5&gt;
      &lt;%= link_to 'Continue Online Shopping', products_path %&gt;
  </code></pre>
  
  <p>for example, if I select item 1 and click add button , it should display the selected item in checkout out page . Help me!!!!!</p>
  
  <p>the selected items should display in this index.html.erb/checkout page</p>