You are viewing documentation for Vaadin Framework 8 and related products View documentation for Vaadin Framework 7 ›
Using Inside a Form · Vaadin
Vaadin Elements - Combo Box - Using Inside a Form

Using Inside a Form

The <vaadin-combo-box> element implements the IronFormElementBehavior, so it can be used as a field in an iron-form.

  <form method="post">
    <vaadin-combo-box name="name" label="Element"></vaadin-combo-box>
  var form = document.querySelector('form');
  var combobox = document.querySelector('vaadin-combo-box');

  form.addEventListener('iron-form-submit', function() {
    alert('Form submitted with name: ' + form.serialize().name);
    return false;