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

Displaying attr_text in a drop down menu

1703034900
Briteblade
Pro
Sheet Author
Is there a way to do this? I would like to use player input fields as dropdown menus on their character sheet, but I'm having trouble figuring out a way to do it.  So for example, if the player basically has skills named "Dancing" rated at 5, "Darts" rated at 3, and "Deconstruction" rated at 9, can they be options on the drop down? Code so far looks something like as follows, but obviously displays "@{skill_1}",  "@{skill_2}", and  "@{skill_3}" instead of the desired Dancing, Darts, and Deconstruction <section class="role f-col nowrap">     <h3>Skills</h3>     <div class="f-row nowrap">      <input name="attr_skill_1" type="text">      <input type="number" min="1" max="9" name="attr_skill_pow_1">     </div>     <div class="f-row nowrap">      <input name="attr_skill_2" type="text">      <input type="number" min="1" max="9" name="attr_skill_pow_2">     </div>     <div class="f-row nowrap"> <input name="attr_skill_3" type="text">         <input type="number" min="1" max="9" name="attr_skill_pow_3">     </div> </section> <select name="attr_supportattribute" class="regular fancy">     <option value="@{skill_pow_1}">"@{skill_1}"</option>     <option value="@{skill_pow_2}">"@{skill_2}"</option>     <option value="@{skill_pow_3}">"@{skill_3}"</option> </select> Is this possible with the sheets, or am I chasing a pipe dream?
1703035116
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You'll need to use a sheetworker using the populateListOptions function  
1703047151
Briteblade
Pro
Sheet Author
Noted, I'll get on that. Thanks!