title: Input does not submit
body: <p>I’m implementing the Stripe card API.</p>
  
  <p>Card details are sent to Stripe and Stripe generates a token. When the form is submitted, the form is prevented from submitting with JavaScript (event.preventDefault()), a token is generated by Stripe, the value of a hidden input in the form is set to the token. This is confirmed by alerting the value of the element. The form is then successfully submitted with form.submit().</p>
  
  <p>The only issue is… the hidden input does not get submitted, despite the value being set alongside the name attribute and the method being POST for the form.</p>
  
  <p>I don’t understand this. Are there any known issues? I’ve tried with GET too, to ensure I could see it if it was submitted with the form (in the URL) and it wasn’t.</p>
  
  <pre><code>&lt;form action="https://secure.inquaress.com/checkout/payment/charge" method="POST" id="payment-form" style="line-height: 30px;line-height: 3vmax;"&gt;
                      &lt;input id="stripeToken" type="hidden" name="stripeToken" value="" /&gt;
                      &lt;div class="form-row"&gt;
                          &lt;label for="card-element"&gt;
                            Credit or debit card
                          &lt;/label&gt;
                          &lt;div id="card-element"&gt;
                            &lt;!-- A Stripe Element will be inserted here. --&gt;
                          &lt;/div&gt;
  
                          &lt;!-- Used to display Element errors. --&gt;
                          &lt;div id="card-errors" role="alert"&gt;&lt;/div&gt;
                      &lt;/div&gt;
                      &lt;button id="card-payment-submit"&gt;Submit Payment&lt;/button&gt;
                  &lt;/form&gt; 
                      &lt;script&gt;
                      var stripe = Stripe('pk_test_0uejDjv1y2yiA5ODrlGIv0Nd');
                      var elements = stripe.elements();
                      var style = {
                        base: {
                          // Add your base input styles here. For example:
                          fontSize: '16px',
                          color: "#32325d",
                        }
                      };
  
                      // Create an instance of the card Element.
                      var card = elements.create('card', {style: style});
  
                      // Add an instance of the card Element into the `card-element` &lt;div&gt;.
                      card.mount('#card-element');
                      card.addEventListener('change', function(event) {
                        var displayError = document.getElementById('card-errors');
                        if (event.error) {
                          displayError.textContent = event.error.message;
                        } else {
                          displayError.textContent = '';
                        }
                      });
  
                      // Create a token or display an error when the form is submitted.
  
                      function stripeTokenHandler(token) {
                        // Insert the token ID into the form so it gets submitted to the server
                        document.getElementById('stripeToken').value = token.id;
                        alert(document.getElementById('stripeToken').value);
                        // Submit the form
                        form.submit();
                      }
  
                      var form = document.getElementById('payment-form');
                      form.addEventListener('submit', function(event) {
                        event.preventDefault();
  
                        stripe.createToken(card).then(function(result) {
                          if (result.error) {
                            // Inform the customer that there was an error.
                            var errorElement = document.getElementById('card-errors');
                            errorElement.textContent = result.error.message;
                          } else {
                            // Send the token to your server.
                            stripeTokenHandler(result.token);
                          }
                        });
                      });
  
                      &lt;/script&gt;
  </code></pre>