another way of doing a readOnly attribute to a select element is by using css. you could do . Doing so the selected option will make it into the post-back data.
HTML input readonly Attribute GeeksforGeeks
› questions › how-to-set-select-element-as-reado. see this answer - HTML form readonly SELECT tag/input. You should keep the select element disabled but also add another hidden input with.
Copying code from Stack Overflow? Sign up using Facebook. Featured on Meta. Afwan Zikri Afwan Zikri 21 1 1 bronze badge.
Is your code noscript safe?
GalV,is that will pass on server? Alessandro Vendruscolo Active 3 years ago.
But you can still change the value with keyboard. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Video: Make select read only USB Flash Drive - Read Only (Hardware + Software method)
I am a Developer, Blogger and Coffee addict.
TORRE PICASSO MADRID DIRECCIONES
|Sojourneer Sojourneer 1.
I'm not saying there's never a good use case for select or hidden form fields. It wont work. It so, yes, there is no good way of doing it.
Already on GitHub?
HTML readonly Attribute
Copy link Quote reply. So, your hidden sits before your select and holds the selected value. I like this solution. Are you trying to use an editable-select and make it read-only and not disabled?
I managed it by hiding the select box and showing a span in its place with only informational value. Rafael Moni Rafael Moni 1 1 gold badge 9 9 silver badges 21 21 bronze badges.