Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Dropdown not working

1723910446

Edited 1723910483
Ano
Pro
Hey there. I'm making a homebrew character sheet and Im having issues with a dropdown menu. Here is my code: <label>Species:</label> <select name="attr_species" />     <option name="">--Choose a Species--</option>     <option name="human">Human</option>     <option name="lizaur">Lizaur</option>     <option name="mutant">Mutant</option>     <option name="fodder">Fodder</option>     <option name="cyborg">Cyborg</option>     <option name="robot">Robot or Android</option>     </select> When I use this I keep getting a blank dropdown and all of the options are listed in text below the dropdown itself. I'm brand new to html so I'm sure its something simple I've missed. Thanks! 
1723915101

Edited 1723915200
vÍnce
Pro
Sheet Author
Hi Ano, your format for the select is a little off.  Try this; <select name="attr_species"> <option value="" selected>--Choose a Species--</option> <option value="human">Human</option> <option value="lizaur">Lizaur</option> <option value="mutant">Mutant</option> <option value="fodder">Fodder</option> <option value="cyborg">Cyborg</option> <option value="robot">Robot or Android</option> </select>
1723953567
GiGs
Pro
Sheet Author
API Scripter
I'm sure Vince has spotted the problem, and i just want to add something. If you don't mind dealling with words in title case, you don't need to set the value. You can do this: <select name="attr_species"> <option value="" selected>--Choose a Species--</option> <option>Human</option> <option>Lizaur</option> <option>Mutant</option> <option>Fodder</option> <option>Cyborg</option> <option value="Robot">Robot or Android</option> </select> If you dont list a value next to option, it'll take the text as the value. If you need it to be in lower case in a sheet worker, you can set that something like this: const species = values.species.toLowerCase();