allow pdf only on form input code example
Example: how to ensure only pdf files are selected
<input type="file" name="upload" accept="application/pdf,application/vnd.ms-excel" />
<input type="file" name="upload" accept="application/pdf,application/vnd.ms-excel" />