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

Calling an action button from a repeating section

1679156904
Matthew C
Pro
Sheet Author
Hey, strange thing happening that is preventing me from making tabs using the action buttons (preferred method). < fieldset class = "repeating_war" >             < div name = "ActiveWarStats" style = " position: relative; top: 1px; margin-bottom: 4px !important;" >                 < details name = "activeWAR" class = "activeWarShell activeWARsummary" style = " border-top: 0px !important; margin-top: 2px !important;" >                     < summary >                         < div class = "activeFlex" style = " width: 439px; height: 30px; align-items: center;" >                             < div class = "activeWARBox" ></ div >                             < div style = " width: 241px; border-bottom: 1px solid; height: 29px; display: flex; align-items: center; justify-content:space-between;" >                                 < input spellcheck = 'false' autocorrect = 'off' type = "text" name = "attr_WAR_name" autocomplete = "nope" maxlength = "20" style = " font-size:10pt;height: 17px; margin-top: 3px !important;width:170px;z-index: 900;" placeholder = "WAR Name" >                                 < div style = " display: flex; align-items: center; flex-direction: column;" >                                     < h4 style = " margin-bottom: -5px !important; margin-right: 3px !important; cursor: pointer; user-select: none;z-index: 900; height: 16px;" > Show/Hide </ h4 >                                     < h4 style = " margin-right: 3px !important; cursor: pointer; user-select: none;z-index: 900; height: 16px;" > Runes </ h4 >                                 </ div >                             </ div >                             < input type = "hidden" name = "attr_activeeffects" value = "0" class = "activeeffects" >                             < button type = "action" name = "act_effect" class = "awar activetitle" > Effect Runes </ button >                             < button type = "action" name = "act_effort" class = "arune activetitle" > Effort Runes </ button > that is a small section of the repeatable field, but it shows the relevant info on ( 'clicked:repeating_war:effort' , ( info ) => {             console . log ( info );         }); as far as I can tell the above should be called and tell me what info is (my actual code is much longer, but even this is not called) on ( 'clicked:effort' , ( info ) => {             console . log ( info );         }); using the above it does get called, but I cannot pull the rowID from this (unless I am doing something wrong) which I need to modify a variable any help would be greatly appreciated
1679161905
GiGs
Pro
Sheet Author
API Scripter
It's not apparent what isn't working from your code sample. Can you post something that doesn't work properly?
1679167298
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I would bet that the issue is you have a position property specified in one of your containers (or on the action button itself). There is a bug where any sort of position declaration that affects a repeating action button or one of it's ancestors (other than the repitem div), the listener breaks.
1679210902
Matthew C
Pro
Sheet Author
Scott C. said: I would bet that the issue is you have a position property specified in one of your containers (or on the action button itself). There is a bug where any sort of position declaration that affects a repeating action button or one of it's ancestors (other than the repitem div), the listener breaks. Thanks mate, this was it. Using position for the repitem and repcontrol etc. was just fine, but the div using position just inside repeating section broke it and that broke it...very strange, but that was solvable, so all is well, thanks again