Select option with value/title
See original GitHub issueFirst of all, thanks for your awesome library, it helps me a lot…
I wonder if the library can render the select tag like:
<select>
<option value="id1">Title 1</option>
<option value="id2">Title 2</option>
</select>
for the enum, and I read the post https://github.com/brutusin/json-forms/issues/42, I found that we can use the script to decorate the returned object. But my situation is I load the scheme on the fly, and have no way to put the right decoration script.
I look into your source code: line 193-195:
var option = document.createElement("option");
var textNode = document.createTextNode(s.enum[i]);
option.value = s.enum[i];
then the value and the title are the same. Is there any support for value/title select in near future?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Make an unselectable option in html select - Stack Overflow
is there a way to create a select element, but in the middle of the option itens, an option that cant be selected?...
Read more >Can i give a title to the select tag? - HTML & CSS - SitePoint
my question is, can i give some kind of title to the select tag so it will appear ... <select> <option value="0"> Select...
Read more >How to Get the Value of Selected Option in a Select Box Using ...
Answer: Use the jQuery :selected Selector. You can use the jQuery :selected selector in combination with the val() method to find the selected...
Read more >JavaScript Select Option - javatpoint
<title>JavaScript Selected Value</title>; <link href="css/selectbox.css" ...
Read more >jQuery <select> get the value of selected option in a select box
Copy <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery Get Selected Option Value</title> <script ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for your support. I put my code here to hope that it’s helpful for someone:
For a drop down
where Programs is an array
So the list of items in the drop down are names of the programs.
Is there a way I can store ID instead of name, when the user selects the name from the dropdown? @idelvall