Script validation required on data list option
<pre><code>&lt;form action="order.php" method="post" name="myForm" id="dropdown" onsubmit="return(validate());"&gt;
    &lt;input list="From" name="From" autocomplete="off" type="text" placeholder="From Place"&gt;
    &lt;datalist id="From"&gt;
        &lt;option value="Stand"&gt;
        &lt;option value="Hospital"&gt;
    &lt;/datalist&gt;
&lt;/form&gt;
</code></pre>

<p><hr>
Script Validation :</p>

<pre><code>&lt;script&gt;
    if (document.myForm.From.value == "") {
        alert("Please select From Place.!");
        return false;
    }
&lt;/script&gt;
</code></pre>

<p>If null then given me the error message :</p>

<blockquote>
  <p>Please select From Place.!</p>
</blockquote>

<p>User's input is also printing... But i need Option Value to print only ie. "Stand","Hospital"... <br>
I have also deleted <code>type="text"</code> but it didn't change anything.</p>