Hello, first time character sheet author here, and I'm working on adding another DCC sheet option to Roll20. Specifically, one that can manage multiple characters at once, rather than a single character (primary to facilitate funnels). In my current iteration of the sheet, I'm putting basically everything inside a repeated section; each character is going to be a single entry in the section. So this means that every attribute and action button is effectively inside the "repeating_heroes" section. Within each sheet, I wanted to have a row of buttons that allow you to switch between different views of the sheet. Here's the snippet: <div class="hero-details"> <div class="hero-details-buttons"> <button class="details-button" type="action" name="act_selectLevel0">Level 0</button> <button class="details-button" type="action" name="act_selectInventory">Inventory</button> <button class="details-button" type="action" name="act_selectStatus">Status</button> <button class="details-button" type="action" name="act_selectAbilities">Abilities</button> <button class="details-button" type="action" name="act_selectSpellcasting">Spellcasting</button> </div> <input class="toggle" type="hidden" name="attr_selectLevel0"/> <div class="hero-details-content"> <div class="level_zero">LEVEL 0 PLACEHOLDER</div> </div> <input class="toggle" type="hidden" name="attr_selectInventory"/> <div class="hero-details-content"> <div class="inventory">INVENTORY PLACEHOLDER</div> </div> <input class="toggle" type="hidden" name="attr_selectStatus"/> <div class="hero-details-content"> <div class="status">STATUS PLACEHOLDER</div> </div> <input class="toggle" type="hidden" name="attr_selectAbilities"/> <div class="hero-details-content"> <div class="abilities">ABILITIES PLACEHOLDER</div> </div> <input class="toggle" type="hidden" name="attr_selectSpellcasting"/> <div class="hero-details-content"> <div class="spells">SPELLCASTING PLACEHOLDER</div> </div> </div> And here's the associated javascript: <script type="text/worker">
on("clicked:repeating_heroes:selectLevel0", function() {
console.log("Clicked Level 0");
setAttrs({
repeating_heroes_selectLevel0: true,
repeating_heroes_selectInventory: false,
repeating_heroes_selectStatus: false,
repeating_heroes_selectAbilities: false,
repeating_heroes_selectSpellcasting: false
});
});
on("clicked:repeating_heroes:selectInventory", function() {
console.log("Clicked Inventory");
setAttrs({
repeating_heroes_selectLevel0: false,
repeating_heroes_selectInventory: true,
repeating_heroes_selectStatus: false,
repeating_heroes_selectAbilities: false,
repeating_heroes_selectSpellcasting: false
});
});
on("clicked:repeating_heroes:selectStatus", function() {
console.log("Clicked Status");
setAttrs({
repeating_heroes_selectLevel0: false,
repeating_heroes_selectInventory: false,
repeating_heroes_selectStatus: true,
repeating_heroes_selectAbilities: false,
repeating_heroes_selectSpellcasting: false
});
});
on("clicked:repeating_heroes:selectAbilities", function() {
console.log("Clicked Abilities");
setAttrs({
repeating_heroes_selectLevel0: false,
repeating_heroes_selectInventory: false,
repeating_heroes_selectStatus: false,
repeating_heroes_selectAbilities: true,
repeating_heroes_selectSpellcasting: false
});
});
on("clicked:repeating_heroes:selectSpellcasting", function() {
console.log("Clicked Spellcasting");
setAttrs({
repeating_heroes_selectLevel0: false,
repeating_heroes_selectInventory: false,
repeating_heroes_selectStatus: false,
repeating_heroes_selectAbilities: false,
repeating_heroes_selectSpellcasting: true
});
});
</script> Whenever I click the buttons, however, I'm not even seeing my messages log to the console, so the listeners clearly aren't even firing in the first place (I'm not seeing any errors in the console either). I did see a similar question posted here: <a href="https://app.roll20.net/forum/post/7320330/on-clicked-action-button-and-repeating-sections" rel="nofollow">https://app.roll20.net/forum/post/7320330/on-clicked-action-button-and-repeating-sections</a> . But the resolution on that thread seemed to be that yes, buttons in repeating sections are supported. And I'm not doing either of the things mentioned in that thread to cause issues with the buttons (no underscores in the names, and no positional styling anywhere in the sheet). I'm a little stumped at this point, so I wanted to post here to see if anyone else has an idea what I'm doing wrong. Is there something I missed? Has there maybe been a regression such that buttons no longer work in repeated sections?