Hello Roll20 Pros! The Problem Does anyone have a good solution to duplication a group of radio buttons? In my character sheet I have two tabs, and I would like values to work across each tab. The data is something like this <div class="sheet-tab-content sheet-section-weapon-standard-melee">
<!-- Checkbox and input works fine -->
<input type='checkbox' name='attr_strbonus' title="@{strbonus}" value='1' checked/>
<input type="text" name="attr_weaponname" title="@{weaponname}" class="sheet-middle">
<!-- Radio buttons create problems -->
<input type="radio" name="attr_range-mod-attack" value="0" checked/>
<input type="radio" name="attr_range-mod-attack" value="-2"/>
<input type="radio" name="attr_range-mod-attack" value="-5"/>
</div>
<div class="sheet-tab-content sheet-section-weapon-player-option-melee">
<!-- Checkbox and input works fine -->
<input type='checkbox' name='attr_strbonus' title="@{strbonus}" value='1' checked/>
<input type="text" name="attr_weaponname" title="@{weaponname}" class="sheet-middle">
<!-- Radio buttons create problems -->
<input type="radio" name="attr_range-mod-attack" value="0" checked/>
<input type="radio" name="attr_range-mod-attack" value="-2"/>
<input type="radio" name="attr_range-mod-attack" value="-5"/>
</div> I would like the sheet to work such as if a player changes the value on one tab, and then changes to another tab, then the same value will be chosen on the currently viewed tab. So in this case if a player on the Standard tab changes the value from 0 to -2, and then changes to the player option tab, then I would like the chosen value on the new tab to also be -2. I understand why Radio buttons, in the configuration I just made above, do not work as I intend. By design only a single value can be selected from a radio button group. And by giving all of the buttons the same name attribute they are considered to be in the same group so therefore only one of the 6 can be chosen at a time. If I change the radio buttons to to be two different groups, by changing the name attribute, then they are not the same group and therefore will not be linked. It would look something like this: <div class="sheet-tab-content sheet-section-weapon-standard-melee">
<!-- Radio buttons create problems -->
<input type="radio" name="attr_range-mod-attack" value="0" checked/>
<input type="radio" name="attr_range-mod-attack" value="-2"/>
<input type="radio" name="attr_range-mod-attack" value="-5"/>
</div>
<div class="sheet-tab-content sheet-section-weapon-player-option-melee">
<!-- Radio buttons create problems -->
<input type="radio" name="attr_range-mod-attack2" value="0" checked/>
<input type="radio" name="attr_range-mod-attack2" value="-2"/>
<input type="radio" name="attr_range-mod-attack2" value="-5"/>
</div> The solution? I am not interested in any solution that changes the radio buttons to checkboxes, as that would allow a player to select multiple values, which is not what I want. I want to limit the player to only select a single value. Is there a way to use a SheetWorker in some way to update one group of radio buttons, when another is changed and vice versa? I have not worked with SheetWorkers up until now, but it sounds like something made specifically for a purpose like this. I would prefer if any solution would also work with repeating fields, as I would like the player to be able to add multiple rows of weapons, and I would like each row in each table to be linked, in which I mean tab Standard-repeating row 1's radio buttons are linked with tab Player Option-repeating row 1's radio buttons. I don't know if this is entirely impossible as I have noticed that radio buttons are getting a new value when placed in a repeating row: <input type="radio" name="attr_-M5qGhnZreCJilm3Gk9o_repeating_weapons2_range-mod-attack" data-attrname =" range-mod-attack " > In this case I don't know if it is the name tag or the data-attrname tag that is read. Looking at the forum I found this: <a href="https://app.roll20.net/forum/post/2495912/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/2495912/slug%7D</a> which didn't really help. Any clearification is helpful!