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

Adding or removing lines from an inventory

1578972388
Robert R.
Plus
Marketplace Creator
Sorry for once again having another newbie question, but you all have been extremely helpful in getting a very decent character sheet going. I think what I want to use is a Repeating section, but I'm having trouble understanding how the example gels with it.  What I'm looking to do is setup an inventory line (Name, Weight, Quantity) and then be able to add/remove repeating lines.  Obviously they'd need to spawn a new Attribute name in order to track properly. Sorry if I'm dense not understanding the Repeating tutorial, but it looks as if it's doing something else entirely from what I'm talking about in the example. Thanks again, all the past assistance have helped immensely.  Very appreciated.
1578973316
vÍnce
Pro
Sheet Author
Hi Robert, An inventory list is a perfect use case for repeating sections(fieldsets). The way fieldsets work is that a single block of code found within the <fieldset> will be re-used to add a new row every time the +Add button is clicked.  Each new row is assigned a rowID so that each attribute within the row is unique even though the attribute names are still the same.  This allows sheet workers to tally all attribute's between rows e.g. weight, total, etc. Which part of fieldsets are you getting hung up on Robert?
1578990543
Robert R.
Plus
Marketplace Creator
Ah, managed to get it. Thanks again, sorry for all the stupid questions.  Fortunately the sheet is going exceptionally well, far better looking than I thought draft 1 would be. I do have a small follow up question; is it possible to change the look of the Add / Remove buttons?  Not a huge deal, just wondering.  They are working great now though. Thanks again for all the help everyone.
1578992085

Edited 1578992147
vÍnce
Pro
Sheet Author
No worries. If you add the classes below to your css file, you should be able to style the repeating buttons that get added after repeating sections.  Replace {...} with whatever you need.  Cheers /* repcontrol buttons */ .repcontrol {...} .repcontrol_add {...} .repcontrol_edit {...} .repcontrol_del {...} .repcontrol_move {...}
1579033331

Edited 1579033946
Robert R.
Plus
Marketplace Creator
Wow, thanks again.  Absolutely extremely helpful, got it working great! I really appreciate the replies, I can't stress enough how much it's helped.  Other than polish, I nearly have the whole thing feature complete.