title: Getting table row value in checkbox and sending mail consisting the particular values
body: <p>I'm struggling in getting the table row values inside a checkbox and also i want to send email to users consisting of the same checkbox values selected.</p>
  
  <pre><code>{% block main_content %}
  
  {% set msgclasses = {'success': 'shj_g', 'notice': 'shj_o', 'error':'shj_r'} %}
  {% for message in messages %}
      &lt;p class="{{ msgclasses[message.type] }}"&gt;{{ message.text }}&lt;/p&gt;
  {% endfor %}
  
  {% if all_assignments|length == 0 %}
      &lt;p style="text-align: center;"&gt;Nothing to show...&lt;/p&gt;
  {% else %}
      &lt;br/&gt;
      &lt;table id="mytable" class="sharif_table"&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;Select Assessments&lt;/th&gt;
                  &lt;th&gt;Assessment Statistics&lt;/th&gt;
                  &lt;th&gt;Name&lt;/th&gt;
                  &lt;th&gt;Problem Statement&lt;/th&gt;
                  &lt;th&gt;Submissions&lt;/th&gt;
                  &lt;th&gt;Coefficient&lt;/th&gt;
                  &lt;th&gt;Start Time&lt;/th&gt;
                  &lt;th&gt;Finish Time&lt;/th&gt;
                  &lt;th&gt;Status&lt;/th&gt;
                  {% if user.level &gt; 0 %}
  
                  {% endif %}
              &lt;/tr&gt;
          &lt;/thead&gt;
          {% for item in all_assignments|reverse %}
              &lt;tr&gt;
                  &lt;td&gt;&lt;input type="checkbox" class="check" value="item.name"/&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;i class="pointer select_assignment fa {{ item.id == user.selected_assignment.id ? 'fa-check-square-o color6' : 'fa-square-o' }} fa-2x" data-id="{{ item.id }}"&gt;&lt;/i&gt;&lt;/td&gt;
                  &lt;td dir="auto"&gt;{{ item.name }}&lt;/td&gt;
                  &lt;td&gt;
                      &lt;a href="{{ site_url('assignments/pdf/'~item.id) }}"&gt;&lt;img src="{{ base_url('assets/images/pdf.svg') }}" /&gt;&lt;/a&gt;
                  &lt;/td&gt;
                  &lt;td&gt;{{ item.total_submits }} submission{{ item.total_submits != 1 ? 's' }}
                  &lt;/td&gt;
                  &lt;td&gt;
                      {% if item.finished %}
                          &lt;span style="color: red;"&gt;Finished&lt;/span&gt;
                      {% else %}
                          {{ item.coefficient }} %
                      {% endif %}
                  &lt;/td&gt;
                  &lt;td&gt;{{ item.start_time }}&lt;/td&gt;
                  &lt;td&gt;{{ item.finish_time }}&lt;/td&gt;
                  &lt;td&gt;
                      {% if item.open %}
                          &lt;span style="color: green;"&gt;Open&lt;/span&gt;
                      {% else %}
                          &lt;span style="color: red;"&gt;Close&lt;/span&gt;
                      {% endif %}
                  &lt;/td&gt;
  
                  {% if user.level &gt; 0 %}
                  {% endif %}
              &lt;/tr&gt;
          {% endfor %}
      &lt;/table&gt;
  </code></pre>
  
  <p>checkbox should take the values of certain table rows and the values have to be passed inside email body.</p>
  
  <p><a href="https://i.stack.imgur.com/HcJUa.jpg" rel="nofollow noreferrer">image for code</a></p>