input pdf only html code example
Example 1: input type file allow only pdf
<input type="file" id="test" name="test" accept=".pdf,.doc"/>
Example 2: how to ensure only pdf files are selected
<input type="file" name="upload" accept="application/pdf,application/vnd.ms-excel" />