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

drop-down menu taking names and values from repeating rows??

1495392832

Edited 1495393531
As the title says, I bet it is possible but I've been trying to figure it out for two days now and I have no idea how to do it. Javascript maybe? I'd rather stick to the html, I can't into java. Idea is pretty simple, I have <fieldset class="repeating_dexskills> so people can add their skills at will and I want my <select class="sheet-smallselect"> to take info from these for it's <option>name</option> and it's value. I just want the options to pop us in that drop-down menu as people add their dex skills in other place of the sheet. It's for a drop-down menu in another repeating fieldset so people can pick basic skill used for the  the weapon's attack rolls. Is this possible without too much hokey-pokey? Is this even clear what I want? I've just read that out loud and I'm not quite sure if it makes any sense to anyone else but me... Edit: basically  THIS but using added repeating_dexskills instead of "Architect"
If you notice, there are scripts in that example that are making the whole thing work. Unfortunately, you will need javascript to make what you are looking for. There are a few wizards hiding on this site that could help you with the setup I'm sure, the trick is getting their attention. The basic problem is, a fieldset doesn't exist until it does and even then only X many of them exist until either they don't or more are added. The html can really only work with what is constantly there. If you watch the attributes and abilities page, repeating section inputs don't show up there. To monitor and base something in the html off of a repeating section, you'll need a script that watches for certain behaviors such as an attribute changing or a checkbox being selected within the repeating section to then update the html accordingly. P.S.: I'm no good at scripting, or I'd offer to help, but hopefully, this will keep you visible for one of the guys who are really good at it to see your post :)
1495472352
Lithl
Pro
Sheet Author
API Scripter
SFX said: There are a few wizards hiding on this site that could help you with the setup I'm sure, the trick is getting their attention. There is no means for a sheet worker script or API script to manipulate what <option> elements exist on the page. This is not possible.
1495472947
Jakob
Sheet Author
API Scripter
I think there is a way, by some clever use of CSS to make something else look like a select, including a copy of the repeating section within, and making the repeating rows look like the options. To get the selected value out and put it into an attribute on the outside, you would need to use a sheet worker. That being said, it feels like this would be quite a bit of labor to actually implement.