title: Associate input type checkbox to input type text
body: <p>I have a problem, I need to associate a input type checkbox to a input type text.</p>
  
  <p>The situation is as follows:</p>
  
  <p>Extract data from a database. The PK data are the value of the checkbox. When a checbox select an input type text where you can enter a specific number is activated.</p>
  
  <p>Now the problem is that selecting a checkbox input text all kinds are activated. And what I hope is that by selecting the checkbox input only the input associated with the checkbox enabled.</p>
  
  <p>My HTML code (This code creates a input checkbox and input text for each record in the database, and what I want is to activate a specific checkbox is activated, the input type text):</p>
  
  <pre><code>&lt;form action="send.php" method="POST" id="form-touch"&gt;
      &lt;?php foreach ($data as $key): ?&gt;
          &lt;div id="inputsForm"&gt;
                &lt;input type="checkbox" class="id-check" name="nuevoid[]" value="&lt;?php echo $key['pr_id'] ?&gt;"&gt;
                  &lt;input type="newquantity[]" class="myinput" disabled name="newQuantity" value="" placeholder="Enter quantity"&gt;
          &lt;/div&gt;
      &lt;?php endforeach; ?&gt;
                  &lt;input type="submit" value="Send"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>My jquery code (code that activates or deactivates the text field by selecting a checkbox):</p>
  
  <pre><code>$('.id-check').change(function(){
      if ($('.id-check').is(':checked') == false){
           $('.myinput').val('').prop('disabled', true);
     } else {
           $('.myinput').val('1').prop('disabled', false);
     }
  });
  </code></pre>
  
  <p>How I can achieve what I want? Greetings from Chile.</p>