title: Setting hidden datalist option values
body: <p>In the snippet below, I have two methods to choose an item: input with datalist and traditional select with options.</p>
  
  <p>The select element keeps the option values hidden, and we're still able to get it with <code>this.value</code>. However, with the datalist, the value is actually displayed and the text content of the option is displayed as a secondary label.</p>
  
  <p>What I'd like is to have the input+datalist approach behave like a traditional select, where "Foo" and "Bar" are shown as options that when selected have values of "1" and "2" respectively.</p>
  
  <p>I've also added a repeated name "Foo" with value "3". This is to show that any solution must not depend on unique options.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input list="options" onchange="console.log(this.value)"/&gt;
  &lt;datalist id="options"&gt;
    &lt;option value="1"&gt;Foo&lt;/option&gt;
    &lt;option value="2"&gt;Bar&lt;/option&gt;
    &lt;option value="3"&gt;Foo&lt;/option&gt;
  &lt;/datalist&gt;
  
  &lt;select onchange="console.log(this.value)"&gt;
    &lt;option value=""&gt;&lt;/option&gt;
    &lt;option value="1"&gt;Foo&lt;/option&gt;
    &lt;option value="2"&gt;Bar&lt;/option&gt;
    &lt;option value="3"&gt;Foo&lt;/option&gt;
  &lt;/select&gt;</code></pre>
  </div>
  </div>
  </p>