title: Can't have the value of a check box from HTML using Flask
body: <p>I'm facing a problem while trying to use a check box defined in my HTML code ! The check box is used to select RegEx search !</p>
  <p>Here a screenshot of the Layout : <a href="https://i.stack.imgur.com/6Gtl4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6Gtl4.png" alt="enter image description here" /></a></p>
  <p>This is the HTML code :</p>
  <pre><code>&lt;div class=&quot;filter_1&quot;&gt;
      Filter :
  &lt;/div&gt;
  
  
  &lt;div class=&quot;RegEx_1&quot;&gt;
      &lt;input type=&quot;checkbox&quot;  name=&quot;check&quot;&gt;
      &lt;label for=&quot;RegEx_1&quot;&gt; RegEx&lt;/label&gt;
  &lt;/div&gt;
  
  &lt;form class =&quot;search_1&quot; name=&quot;search&quot; action=&quot;/search&quot; method=&quot;GET&quot;&gt;
      &lt;input type=&quot;text&quot; placeholder=&quot;Search..&quot; name=&quot;search_11&quot;&gt;
      &lt;input class=&quot;btn_1&quot; type=&quot;submit&quot; value=&quot;Submit&quot;&gt;
  &lt;/form&gt;
  </code></pre>
  <p>The python code (route to call) :</p>
  <pre><code>@app.route('/search', methods =[&quot;GET&quot;, &quot;POST&quot;])
  def search():
  results1=[]
  res=&quot;&quot;
  q = request.args.get('search_11')
  regex_check = request.form.get('check')
  
  if regex_check : 
      res = &quot;the box is checked&quot;
  
  elif q != &quot;&quot; :
      for i in kitt_list:
          if q in i :
              results1.append(i)
      for j in range(len(results1)):
          res = res + &quot;\n&quot; + results1[j]
  
  return render_template('search.html', res=res, q=q)
  </code></pre>
  <p>Here are also the &quot;search.html&quot; :</p>
  <pre><code>&lt;div class=&quot;title_1&quot;&gt;
      Search results in &lt;U&gt;Kitt debug UART&lt;/U&gt; for : &quot; &lt;mark&gt;{{ q }}&lt;/mark&gt; &quot; 
  &lt;/div&gt;
  
  &lt;div id=&quot;searchterm&quot; class=&quot;search_results&quot;&gt;
      {{ res }}
  &lt;/div&gt;
  </code></pre>
  <p>The checkbox is always marked as unchecked !
  Please provide me with any possible solutions !</p>
  <p>Thanks!</p>