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

Hide Areas for Legend of the Five Rings spells?

1519655489

Edited 1519655517
John D.
Sheet Author
API Scripter
I'm trying to create a checkbox to hide some areas for spells in Legend of the Five Rings sheet . After reading <a href="https://wiki.roll20.net/CSS_Wizardry#Hide_Areas" rel="nofollow">https://wiki.roll20.net/CSS_Wizardry#Hide_Areas</a> For HTML I try adding &nbsp;&nbsp;&nbsp; &lt;div&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;fieldset class="repeating_spells"&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;input type="hidden" name="attr_spell_affinity" value="0" /&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;input type="hidden" name="attr_spell_ring" value="0" /&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;table style="width:50%;"&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;strong data-i18n="name-u"&gt;Name:&lt;/strong&gt;&lt;input type="text" name="attr_spell_name" /&gt;&lt;/td&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;td colspan="2"&gt;&lt;strong data-i18n="ring-u"&gt;Ring:&lt;/strong&gt;&lt;select name="attr_spell_ring"&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;option value="" selected&gt;-&lt;/option&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;option data-i18n="air-u"&nbsp; value="@{foo_air}"&gt;Air&lt;/option&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;option data-i18n="earth-u"&nbsp; value="@{foo_earth}"&gt;Earth&lt;/option&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;option data-i18n="fire-u"&nbsp; value="@{foo_fire}"&gt;Fire&lt;/option&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;option data-i18n="water-u"&nbsp; value="@{foo_water}"&gt;Water&lt;/option&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;option data-i18n="void-u"&nbsp; value="@{foo_void}"&gt;Void&lt;/option&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/select&gt;&lt;/td&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;td&gt;&lt;strong data-i18n="keyword-u"&gt;keyword:&lt;/strong&gt;&lt;input type="text" name="attr_spell_keyword" value='' /&gt;&lt;/td&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;td&gt;&lt;strong data-i18n="level-u"&gt;Level:&lt;/strong&gt;&lt;input type="number" name="attr_spell_level" value='1' /&gt;&lt;/td&gt;&lt;/tr&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;strong data-i18n="range-u"&gt;Range:&lt;/strong&gt;&lt;input type="text" name="attr_spell_range"/&gt;&lt;/td&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;td colspan="2"&gt;&lt;strong data-i18n="aoe-u"&gt;AoE:&lt;/strong&gt;&lt;input type="text" name="attr_spell_aoe"&gt;&lt;/td&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;td&gt;&lt;strong data-i18n="duration-u"&gt;Duration:&lt;/strong&gt;&lt;input type="text" name="attr_spell_duration" /&gt;&lt;/td&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &lt;td&gt;&lt;input type="checkbox" class="sheet-arrow"&gt;&lt;/td&gt; &lt;/tr&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &lt;div class="sheet-body"&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;strong data-i18n="raises-u"&gt;Raises:&lt;/strong&gt;&lt;input type="text" name="attr_spell_raises"&gt;&lt;input type="hidden" name="attr_spellTN" value="5 + @{spell_level} * 5"&gt;&lt;/td&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;td&gt;&lt;strong data-i18n="spell-bonus-roll-u"&gt;Bonus Roll:&lt;/strong&gt;&lt;input type="number" name="attr_spell_bonus_roll" value='0'/&gt;&lt;/td&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;td&gt;&lt;strong data-i18n="spell-bonus-keep-u"&gt;Bonus Keep:&lt;/strong&gt;&lt;input type="number" name="attr_spell_bonus_keep" value='0'/&gt;&lt;/td&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;td&gt;&lt;strong data-i18n="spell-bonus-added-u"&gt;Flat Bonus:&lt;/strong&gt;&lt;input type="number" name="attr_spell_bonus_flat" value='0'/&gt;&lt;/td&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;td align="right"&gt;&lt;input type="hidden" name="attr_spell_tn" value="5 + @{spell_level} * 5"&gt;&lt;strong data-i18n="cast-u"&gt;Cast&lt;/strong&gt;&lt;button type="roll" value = "***Spell Description:*** **@{description}** \n/em @{Name} casts @{spell_name} vs TN [[@{spellTN}]]!\n\n/roll [[{[[@{spell_ring}+@{spell_affinity}+@{shugenja_rank}+@{spell_bonus_roll}]], 10}kl1]]d10!!k[[{[[@{spell_ring}+@{spell_bonus_keep}]] + [[floor({[[@{spell_ring}+@{spell_affinity}+@{shugenja_rank}+@{spell_bonus_roll}]] - 10, 0}k1 / 2)]], 10}kl1]] + [[(({{[[@{spell_ring}+@{spell_bonus_keep}]],0}&gt;10} * {{[[@{spell_ring}+@{spell_affinity}+@{shugenja_rank}+@{spell_bonus_roll}]],0}&gt;10} * ((([[@{spell_ring}+@{spell_bonus_keep}]]&nbsp; - 10) + ([[@{spell_ring}+@{spell_affinity}+@{shugenja_rank}+@{spell_bonus_roll}]] - 10)) * 2)) + ({{((floor(([[@{spell_ring}+@{spell_affinity}+@{shugenja_rank}+@{spell_bonus_roll}]] - 10) / 2)) + [[@{spell_ring}+@{spell_bonus_keep}]]),0}&gt;10} * {{[[@{spell_ring}+@{spell_bonus_keep}]],11}&lt;9} *&nbsp; ((([[@{spell_ring}+@{spell_affinity}+@{shugenja_rank}+@{spell_bonus_roll}]] - 10) - ((10 - [[@{spell_ring}+@{spell_bonus_keep}]]) * 2)) * 2))) + @{spell_bonus_flat}]]\n\n"&gt;&lt;/button&gt;&lt;/td&gt;&lt;/tr&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;tr&gt;&lt;td&gt;&lt;strong data-i18n="damage-roll-u"&gt;Damage Roll:&lt;/strong&gt;&lt;input type="number" name="attr_damage_roll" value='0'/&gt;&lt;/td&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;td&gt;&lt;strong data-i18n="damage-keep-u"&gt;Damage Keep:&lt;/strong&gt;&lt;input type="number" name="attr_damage_keep" value='0'/&gt;&lt;/td&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;td&gt;&lt;strong data-i18n="spell-bonus-roll-u"&gt;Bonus Roll:&lt;/strong&gt;&lt;input type="number" name="attr_damage_bonus_roll" value='0'/&gt;&lt;/td&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;td&gt;&lt;strong data-i18n="spell-bonus-keep-u"&gt;Bonus Keep:&lt;/strong&gt;&lt;input type="number" name="attr_damage_bonus_keep" value='0'/&gt;&lt;/td&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;td&gt;&lt;strong data-i18n="spell-bonus-added-u"&gt;Flat Bonus:&lt;/strong&gt;&lt;input type="number" name="attr_damage_bonus_flat" value='0'/&gt;&lt;/td&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;td align="right"&gt;&lt;strong data-i18n="damage-u"&gt;Damage&lt;/strong&gt;&lt;button type="roll" name="roll_damage" value="/em @{name} deals damage with @{spell_name}! \n\n/roll [[{[[@{damage_roll}+@{damage_bonus_roll}]], 10}kl1]]d10!!k[[{[[@{damage_keep}+@{damage_bonus_keep}]] + [[floor({[[@{damage_roll}+@{damage_bonus_roll}]] - 10, 0}k1 / 2)]], 10}kl1]] + [[(({{[[@{damage_keep}+@{damage_bonus_keep}]],0}&gt;10} * {{[[@{damage_roll}+@{damage_bonus_roll}]],0}&gt;10} * ((([[@{damage_keep}+@{damage_bonus_keep}]]&nbsp; - 10) + ([[@{damage_roll}+@{damage_bonus_roll}]] - 10)) * 2)) + ({{((floor(([[@{damage_roll}+@{damage_bonus_roll}]] - 10) / 2)) + [[@{damage_keep}+@{damage_bonus_keep}]]),0}&gt;10} * {{[[@{damage_keep}+@{damage_bonus_keep}]],11}&lt;9} *&nbsp; ((([[@{damage_roll}+@{damage_bonus_roll}]] - 10) - ((10 - [[@{damage_keep}+@{damage_bonus_keep}]]) * 2)) * 2))) + @{damage_bonus_flat}]]"&gt;&lt;/button&gt;&lt;/td&gt;&lt;/tr&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &lt;/div&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/table&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &lt;div class="sheet-body"&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;Strong data-i18n="description-u"&gt;Description&lt;/strong&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;textarea name="attr_description" class="four-lines"&gt;&lt;/textarea&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &lt;/div&gt; &lt;!--&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;span&gt;Spell ring is: &lt;/span&gt;&lt;span name=attr_spell_ring&gt;&lt;/span&gt;&lt;br&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;span&gt;Spell affinity is: &lt;/span&gt;&lt;span name=attr_spell_affinity&gt;&lt;/span&gt; --&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/fieldset&gt; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/div&gt; For CSS I try adding input.sheet-arrow { float: left; } input.sheet-arrow:checked ~ div.sheet-body { display: none; } And I got the checkbox there all right, but nothing collapse when I checked it. What did I do wrong?
1519661106
Finderski
Pro
Sheet Author
Compendium Curator
I believe the problem is your checkbox is in a &lt;td&gt; tag and the &lt;div&gt; you're trying to hide is no longer a sibling&nbsp;because it's in a different table row. You're also missing a name for the input. &nbsp;So, you'd want to give the input a name (and it would be the same name in both places). Just add a second checkbox with the same name right next to your &lt;div&gt; like this: &lt;input type="checkbox" class="sheet-arrow" name="attr_showBody" style="display: none;"&gt; &lt;div class="sheet-body"&gt; I will add, I'm not sure how a &lt;div&gt; inside a &lt;table&gt; and interrupting the flow of things will work (it may not have any issues).
1519661793

Edited 1519661961
Jakob
Sheet Author
API Scripter
1. What Finderski said. 2. Your checkbox is missing a name &nbsp;attribute — it needs to have a name, and the same one as the hidden input, for changes to propagate. 3. Don't use tables for layout. That having been said, since you're already stuck with a table here unless you want to revamp everything, you should probably use &lt;tr&gt; &nbsp;elements instead of &lt;div&gt; s for hiding stuff and adjust the CSS accordingly, otherwise you mess up the table layout. 4. With this CSS it will work for anything that has the sheet-body class, not just divs: input.sheet-arrow:checked ~ .sheet-body { display: none; }
1519722398

Edited 1519722421
John D.
Sheet Author
API Scripter
Thank you both very much for the quick replies. Unfortunately now it only collapse the bottom part, these two rows in the table still show no reaction, even if I did give them class="sheet-body" &nbsp; &nbsp;&lt;div&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;fieldset class="repeating_spells"&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type="hidden" name="attr_spell_affinity" value="0" /&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type="hidden" name="attr_spell_ring" value="0" /&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;table style="width:50%;"&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;&lt;td colspan="2"&gt;&lt;strong data-i18n="name-u"&gt;Name:&lt;/strong&gt;&lt;input type="text" name="attr_spell_name" /&gt;&lt;/td&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td colspan="2"&gt;&lt;strong data-i18n="ring-u"&gt;Ring:&lt;/strong&gt;&lt;select name="attr_spell_ring"&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;option value="" selected&gt;-&lt;/option&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;option data-i18n="air-u"&nbsp; value="@{foo_air}"&gt;Air&lt;/option&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;option data-i18n="earth-u"&nbsp; value="@{foo_earth}"&gt;Earth&lt;/option&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;option data-i18n="fire-u"&nbsp; value="@{foo_fire}"&gt;Fire&lt;/option&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;option data-i18n="water-u"&nbsp; value="@{foo_water}"&gt;Water&lt;/option&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;option data-i18n="void-u"&nbsp; value="@{foo_void}"&gt;Void&lt;/option&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/select&gt;&lt;/td&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;strong data-i18n="keyword-u"&gt;keyword:&lt;/strong&gt;&lt;input type="text" name="attr_spell_keyword" value='' /&gt;&lt;/td&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;strong data-i18n="level-u"&gt;Level:&lt;/strong&gt;&lt;input type="number" name="attr_spell_level" value='1' /&gt;&lt;/td&gt;&lt;/tr&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;&lt;td colspan="2"&gt;&lt;strong data-i18n="range-u"&gt;Range:&lt;/strong&gt;&lt;input type="text" name="attr_spell_range"/&gt;&lt;/td&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td colspan="2"&gt;&lt;strong data-i18n="aoe-u"&gt;AoE:&lt;/strong&gt;&lt;input type="text" name="attr_spell_aoe"&gt;&lt;/td&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;strong data-i18n="duration-u"&gt;Duration:&lt;/strong&gt;&lt;input type="text" name="attr_spell_duration" /&gt;&lt;/td&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;input type="checkbox" class="sheet-arrow" name="attr_showBody"&gt;&lt;/input&gt;&lt;/td&gt;&lt;/tr&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr class="sheet-body" &gt;&lt;td colspan="2"&gt;&lt;strong data-i18n="raises-u"&gt;Raises:&lt;/strong&gt;&lt;input type="text" name="attr_spell_raises"&gt;&lt;input type="hidden" name="attr_spellTN" value="5 + @{spell_level} * 5"&gt;&lt;/td&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;strong data-i18n="spell-bonus-roll-u"&gt;Bonus Roll:&lt;/strong&gt;&lt;input type="number" name="attr_spell_bonus_roll" value='0'/&gt;&lt;/td&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;strong data-i18n="spell-bonus-keep-u"&gt;Bonus Keep:&lt;/strong&gt;&lt;input type="number" name="attr_spell_bonus_keep" value='0'/&gt;&lt;/td&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;strong data-i18n="spell-bonus-added-u"&gt;Flat Bonus:&lt;/strong&gt;&lt;input type="number" name="attr_spell_bonus_flat" value='0'/&gt;&lt;/td&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td align="right"&gt;&lt;input type="hidden" name="attr_spell_tn" value="5 + @{spell_level} * 5"&gt;&lt;strong data-i18n="cast-u"&gt;Cast&lt;/strong&gt;&lt;button type="roll" value = "***Spell Description:*** **@{description}** \n/em @{Name} casts @{spell_name} vs TN [[@{spellTN}]]!\n\n/roll [[{[[@{spell_ring}+@{spell_affinity}+@{shugenja_rank}+@{spell_bonus_roll}]], 10}kl1]]d10!!k[[{[[@{spell_ring}+@{spell_bonus_keep}]] + [[floor({[[@{spell_ring}+@{spell_affinity}+@{shugenja_rank}+@{spell_bonus_roll}]] - 10, 0}k1 / 2)]], 10}kl1]] + [[(({{[[@{spell_ring}+@{spell_bonus_keep}]],0}&gt;10} * {{[[@{spell_ring}+@{spell_affinity}+@{shugenja_rank}+@{spell_bonus_roll}]],0}&gt;10} * ((([[@{spell_ring}+@{spell_bonus_keep}]]&nbsp; - 10) + ([[@{spell_ring}+@{spell_affinity}+@{shugenja_rank}+@{spell_bonus_roll}]] - 10)) * 2)) + ({{((floor(([[@{spell_ring}+@{spell_affinity}+@{shugenja_rank}+@{spell_bonus_roll}]] - 10) / 2)) + [[@{spell_ring}+@{spell_bonus_keep}]]),0}&gt;10} * {{[[@{spell_ring}+@{spell_bonus_keep}]],11}&lt;9} *&nbsp; ((([[@{spell_ring}+@{spell_affinity}+@{shugenja_rank}+@{spell_bonus_roll}]] - 10) - ((10 - [[@{spell_ring}+@{spell_bonus_keep}]]) * 2)) * 2))) + @{spell_bonus_flat}]]\n\n"&gt;&lt;/button&gt;&lt;/td&gt;&lt;/tr&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr class="sheet-body" &gt;&lt;td&gt;&lt;strong data-i18n="damage-roll-u"&gt;Damage Roll:&lt;/strong&gt;&lt;input type="number" name="attr_damage_roll" value='0'/&gt;&lt;/td&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;strong data-i18n="damage-keep-u"&gt;Damage Keep:&lt;/strong&gt;&lt;input type="number" name="attr_damage_keep" value='0'/&gt;&lt;/td&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;strong data-i18n="spell-bonus-roll-u"&gt;Bonus Roll:&lt;/strong&gt;&lt;input type="number" name="attr_damage_bonus_roll" value='0'/&gt;&lt;/td&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;strong data-i18n="spell-bonus-keep-u"&gt;Bonus Keep:&lt;/strong&gt;&lt;input type="number" name="attr_damage_bonus_keep" value='0'/&gt;&lt;/td&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;strong data-i18n="spell-bonus-added-u"&gt;Flat Bonus:&lt;/strong&gt;&lt;input type="number" name="attr_damage_bonus_flat" value='0'/&gt;&lt;/td&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td align="right"&gt;&lt;strong data-i18n="damage-u"&gt;Damage&lt;/strong&gt;&lt;button type="roll" name="roll_damage" value="/em @{name} deals damage with @{spell_name}! \n\n/roll [[{[[@{damage_roll}+@{damage_bonus_roll}]], 10}kl1]]d10!!k[[{[[@{damage_keep}+@{damage_bonus_keep}]] + [[floor({[[@{damage_roll}+@{damage_bonus_roll}]] - 10, 0}k1 / 2)]], 10}kl1]] + [[(({{[[@{damage_keep}+@{damage_bonus_keep}]],0}&gt;10} * {{[[@{damage_roll}+@{damage_bonus_roll}]],0}&gt;10} * ((([[@{damage_keep}+@{damage_bonus_keep}]]&nbsp; - 10) + ([[@{damage_roll}+@{damage_bonus_roll}]] - 10)) * 2)) + ({{((floor(([[@{damage_roll}+@{damage_bonus_roll}]] - 10) / 2)) + [[@{damage_keep}+@{damage_bonus_keep}]]),0}&gt;10} * {{[[@{damage_keep}+@{damage_bonus_keep}]],11}&lt;9} *&nbsp; ((([[@{damage_roll}+@{damage_bonus_roll}]] - 10) - ((10 - [[@{damage_keep}+@{damage_bonus_keep}]]) * 2)) * 2))) + @{damage_bonus_flat}]]"&gt;&lt;/button&gt;&lt;/td&gt;&lt;/tr&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/table&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type="checkbox" class="sheet-arrow" name="attr_showBody"style="display: none;" &gt;&lt;/input&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;Strong class="sheet-body" data-i18n="description-u"&gt;Description&lt;/strong&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;textarea name="attr_description" class="four-lines sheet-body"&gt;&lt;/textarea&gt;&nbsp; &lt;!--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;span&gt;Spell ring is: &lt;/span&gt;&lt;span name=attr_spell_ring&gt;&lt;/span&gt;&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;span&gt;Spell affinity is: &lt;/span&gt;&lt;span name=attr_spell_affinity&gt;&lt;/span&gt;&nbsp; --&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/fieldset&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt; Any ideas?
1519723008
Finderski
Pro
Sheet Author
Compendium Curator
Just add more, invisible inputs with the exact same name as the first input next to those rows. &lt;input type="checkbox" class="sheet-arrow" name="attr_showBody" style="display: none;"&gt; Although&nbsp;I do have to agree with Jakob, you may want to consider ditching the &lt;table&gt; and going with a CSS Grid, which uses &lt;divs&gt; instead. &nbsp;I've found they are much easier to work with than tables and the code seems to be cleaner for me.
1519725229
John D.
Sheet Author
API Scripter
Finderski said: Just add more, invisible inputs with the exact same name as the first input next to those rows. &lt;input type="checkbox" class="sheet-arrow" name="attr_showBody" style="display: none;"&gt; Although&nbsp;I do have to agree with Jakob, you may want to consider ditching the &lt;table&gt; and going with a CSS Grid, which uses &lt;divs&gt; instead. &nbsp;I've found they are much easier to work with than tables and the code seems to be cleaner for me. Okay, now that's fast&nbsp;( ◞・౪・) Thank to you&nbsp;Finderski it work now. And I agree with you&nbsp;wholeheartedly, it's just that design the&nbsp;spell field again take real effort, and I'm too lazy for that. Now the code look too messy for me to show anyone, but hey, as long as it work that's fine isn't it? Again thank you both very much.