Hello Roll20 I suggest that one of the next extensions to Roll20's jQuery implementation Roll20 JQuery should be the ability to toggle HTML elements to be disabled . My use case for this is to dynamically show/hide <option> -elements in a datalist. If a <option> -element in a datalist is disabled then it will not show up on the dropdown. This cannot be achieved with CSS therefore it is necessary to use the disabled tag. Here is an example of how the <option> -element is rendered in a select dropdown and in a datalist: <a href="https://jsfiddle.net/gu8knrhw/" rel="nofollow">https://jsfiddle.net/gu8knrhw/</a> Possibilities today I know that something similar to the example above is possible through the use of show/hide an input field, as described on the wiki: <a href="https://wiki.roll20.net/Character_Sheet_Enhancement#Datalist" rel="nofollow">https://wiki.roll20.net/Character_Sheet_Enhancement#Datalist</a> < input type = "text" list = "classmage" name = "attr_class" class = "mage-skill" >
< input type = "text" list = "classfighter" name = "attr_class" class = "fighter-skill" >
< datalist id = "classmage" >
< option value = "Spellcraft" > Spellcraft < /option >
< option value = "Arithmancy" > Arithmancy < /option >
< /datalist >
< datalist id = "classfighter" >
< option value = "Brawl" > Brawl < /option >
< option value = "Weapon Mastery" > Weapon Mastery < /option >
< /datalist > This is all good if the values in each list are unique from each other, or if you only have two categories. If on the other hand the lists are subsets of each other, or extensions, then the combinatorial explosion will cause the amount of HTML needed to handle each case unreasonably high. Here is an example with a base set, and 3 extensions then the following combinations are possible: Base Base + E1 Base + E2 Base + E3 Base + E1 + E2 Base + E1 + E3 Base + E2 + E3 Base + E1 + E2 + E3 The amount of HTML needed can be seen in this jsfiddle: <a href="https://jsfiddle.net/ox3150wd/1/" rel="nofollow">https://jsfiddle.net/ox3150wd/1/</a> With disable toggle in Roll20 jQuery If we instead could use the Roll20 jQuery and to dynamically show / hide datalist options, then a single list would be all that was needed, and a sheetworker could handle what elements to show. For instance, if a player wanted the Base + E1 + E3 set then the html would look like this: <datalist id="baseExtension1+2+3">
<!-- base -->
<option>base1</option>
<option>base2</option>
<!-- extension1 -->
<option>extension1.1</option>
<option>extension1.2</option>
<!-- extension2 -->
<option disabled>extension2.1</option>
<option disabled>extension2.2</option>
<!-- extension2 -->
<option>extension3.1</option>
<option>extension3.2</option>
</datalist> It looks neat and is easy to understand and maintain. It also removed the need for show / hiding different input fields which I see as a necessary evil at the moment. Possible problems The only problem I see, from the top of my head, is that disabled fields become Autocalc fields on a character sheet. I however believe that this is only the case when a fields is declared as disabled in the source code, and therefore gets added the data-formula field <input type="text"
name="attr_copper"
value="[[1+2]]"
disabled=""
data-formula="[[1+2]]"/> <-------- This field If a field is just disabled without a data-formula field then it should act as a regular disabled field.