title: How do I keep track of all inputs that have been submitted
body: <p>I'm trying to keep track every time someone submits a name using <code>data-name</code> only. How do I alert the user to let them know that the contents were posted to the website or not and what other names have been submitted.</p>
  
  <pre><code>&lt;div id="container"&gt;
    &lt;form method="POST" action="#"&gt;
      &lt;label class="large"&gt;Please enter your name
         &lt;input id="textbox" class="name" data-name="" pattern="[a-zA-Z0-9]{1-45}"&gt;
      &lt;/label&gt;
    &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This is the JQuery I'm using:</p>
  
  <pre><code> //When the form is submitted
  $("#form").submit(function(){
    //get the value of the input
    var input = $('#textbox').val();
  
    //insert it into the data-name attribute
    var name = $("#textbox").attr("data-name", input);
  
    //Aler the user 
    $("input[data-name]").val(function(){
      alert($(this).data('name'));
    });
  
  });
  </code></pre>