title: Saving form data to cookies
body: <p>I've been trying to solve this problem for about a week now with no luck. I'm trying to save a value from a form field to a cookie onclick="updatePricingFunction() but when I click the updatePricingFunction button attached to the onclick, the value doesn't change to the new number. Can anyone help me with this?</p>
  
  <pre><code>function updatePricingFunction(){
   var beforeNoonField = document.getElementById("beforeNoonNPSlot"); // beforeNoonNPSlot is a form id.
      document.cookie = "beforeNoonCookie=" + beforeNoonField; // Create the cookie
  </code></pre>
  
  <p>}</p>