title: Dynamic Button in ejs to fill a form-field
body: <p>i am currently using NodeJS with ejs Templates an a mySQL Database.
  I created an ejs which can print a table dynamically which represents a table in the Database:</p>
  
  <p>The Code looks like this:</p>
  
  <pre><code>&lt;% for(var i=0; i&lt;info.length; i++) {%&gt;
          &lt;tr&gt;
                  &lt;td&gt;&lt;b&gt;&lt;%= info[i].id %&gt;&lt;/b&gt;&lt;/td&gt;
  
                  &lt;td&gt;&lt;%= sinfo[i].path %&gt;&lt;/td&gt;                       
          &lt;/tr&gt;
  &lt;% } %&gt;
  </code></pre>
  
  <p>This work fine.</p>
  
  <p>Somewhere in the same ejs you can find form with an input field.</p>
  
  <p><strong>Looks like this:</strong></p>
  
  <pre><code>&lt;input type="text" name="id" placeholder="id input"required&gt;
  </code></pre>
  
  <p>Now i want to create a button in every row of the table.
  When pressing the button the id-entry out of the colum where the button is in should be filled into my Form-Field. So every row would have one button!</p>
  
  <p>I can't find a way to accomplish this. </p>