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

Drag and drop support for character sheets

1639467215
.Hell
Sheet Author
Hello everyone, is it possible to include a drag and drop feature similar to repeating rows for non-repeating rows? Thanks
1639504531
Finderski
Pro
Sheet Author
Compendium Curator
Yep. You'd need to use the generateRowID() function.
1639508260

Edited 1639508342
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I'm not sure I'm understanding what you're asking for. Do you mean 1) dragging a roll button to the quick bar? or 2)  do you mean dragging an item out from the compendium? or 3)  do you mean reordering the items? #1 just needs a roll button associated with the item #2 is possible but of course requires a compendium for your system #3 is unfortunately not possible
1639585052
.Hell
Sheet Author
Hey, I meant Scott C option #3. To bad, I guess I try to make some sort of menu for hiding/unhiding categories
1639625946

Edited 1639626140
Oosh
Sheet Author
API Scripter
You could just make it a repeating section, but remove the unwanted controls so it doesn't appear as a repeating section to the user (i.e. they can't delete or add rows, and the fields like the row name are not editable). If you have an event handler to grab the value of each row if it changes (e.g. if they were base attributes like Strength, any time the Strength value changes, run a function to find the repeating row with the name "Strength", grab the value and assign it to the attribute "Strength"). You'd then get the re-ordering capability of a repeating section, but have @{strength} available for macros and the rest of your javascript. Since a user could potentially use a CSS edit to uncover the buttons and mess up their sheet, a repair function would probably in order as well.
1639628122
vÍnce
Pro
Sheet Author
sneaky cool.
1639638753
.Hell
Sheet Author
Oosh that is a great idea, but the categories contain repeating rows. And as far as I am aware repeating rows inside repeating rows is not possible.
1639642237
GiGs
Pro
Sheet Author
API Scripter
.Hell said: And as far as I am aware repeating rows inside repeating rows is not possible. You are correct, this is not possible. It might be possible to fake it though.