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

Weight Calculation Help

1667065507

Edited 1667065642
Alright so working on a custom sheet and I'm completely dumbfounded on how to get the weight to work how I want and have it auto calculate for people.         <div class='sheet-col'>             <h4>Equipment Worn</h4>             <fieldset class="repeating_Equipment-worn">                 <table class="sheet-table">                     <tr>                         <td><input type="text" class="sheet-number" name="attr_item-name" placeholder="Item Name" style="width:200px;"/></td>                         <th><input type="checkbox" class="sheet-bigcheck" name="attr_item-show" value="1"/><span></span></th>                     </tr>                 </table>                 <input type="checkbox" class="sheet-hidden sheet-hider" name="attr_item-show" value="1"/><span></span>                 <div class="sheet-hold">                     <table class="sheet-table" style="width:100%;">                         <tr>     <td><h5>Amount</h5><input type="number" class="sheet-number" name="attr_itemamount" value="0"/></td>     <td><h5>Weight</h5><input type="number" class="sheet-number" name="attr_itemweight" value="0"/></td>     <td><h5>Full Weight</h5><input type="number" class="sheet-weight" name="attr_fullweight" value="[[@{itemamount}*@{itemweight}]]" disabled="true"/></td>     <div class="sheet-border"> <textarea wrap="soft" class="sheet-longnotes" name="attr_Equip-Worn" style="width:96%;"/></textarea>     </div>                         </tr>                     </table>                 </div>             </fieldset>     <div class="weighttotal">                 <h5>TOTAL WEIGHT</h5> <td><input type="number" class="sheet-weight" name="attr_totalweight" value="@{fullweight}" disabled="true"/></td> kg.             </div>         </div> Here is the code I'm using to try and pull it off, but I can't figure out how to make the total weight actually translate and group together each grouping of full weight from the actual items. Here is what it looks like on the actual sheet: As you can see it's not calculating anything in the total weight area. I'm not exactly a master coder at all. I pretty much know enough to dangerous and break things honestly. So I'm still learning as I go. This one just has me stumped as I'm not entirely sure what to look up to find the answer.
1667090377
Kraynic
Pro
Sheet Author
You might have better luck switching from the autocalc setup to the javascript sheetworkers.&nbsp; The main difference in the html is that you can't use disabled inputs with sheetworkers.&nbsp; You would change all of those to readonly.&nbsp; There is a good page with a sheetworker to use and set up for the attributes used in your sheet on the wiki specifically for summing weights and other things on the wiki: <a href="https://wiki.roll20.net/RepeatingSum" rel="nofollow">https://wiki.roll20.net/RepeatingSum</a>
Alright, thank you so much! I'll look into it right away.&nbsp;