I checked the example project’s code for the survey form and I found these 2 lines:
Select an optionand
Select an optionWhat is the function of the value attribute in these 2 lines?
I checked the example project’s code for the survey form and I found these 2 lines:
Select an optionand
Select an optionWhat is the function of the value attribute in these 2 lines?
Please add more detail to this post.
The value attribute is the data that gets submitted, if it is not given a value the text inside the option element will be the value.
The disabled attribute sets the option element to be non-selectable. You can use it a bit like the placeholder attribute you know from other input types (like input type text with a placeholder attribute set to some text).
The selected attribute selects the option element as the initially selected element.
Side note: Not sure why (other than to show the difference) the two select elements are using different settings for their first option element.
I just realized I made a few mistakes posting the question, but thank you very much, this is exactly what I wanted to ask.