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

Requesting help with a "/fieldset" issue.

Greetings...I am attempting to create a repeating row with the usual "Add" and "Modify" buttons at the bottom... Here is my code... <div class="sheet-3colrow sheet-row">     <h2>Character Skills, Abilities, & Disadvantages</h2>     <h4 class="sheet-section-head">Skills & Abilities</h4>     <div>         <div class="sheet-skill-header sheet-skill-value sheet-center">Roll</div> <div class="sheet-skill-header sheet-skill-label">Skill</div> <div class="sheet-skill-header sheet-skill-value sheet-center">Cost</div>     </div>     <fieldset class="repeating_skill">     <div>         <input class="sheet-skill-value sheet-center" name="attr_skill1_roll" type="text" value="n/a"> <input class="sheet-skill-label sheet-left" name="attr_skill1_name" type="text"> <input class="sheet-skill-value sheet-center" name="attr_skill1_cost" type="number" value="0">     </div>     </fieldset> </div> The problem I am getting is that the data I am entering into the input fields is not being assigned to attributes in the "attributes & abilities" page of the character sheet... Ho do I resolve this? Thanks in advance...Ray
1547642900
Finderski
Plus
Sheet Author
Compendium Curator
You can’t...repeating field sets never appear in the Attributes and Abilities tab...
1547648054

Edited 1547648094
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
To add on to Finderski's answer, this has absolutely no effect on the ability to use those attributes in macros though.
Finderski said: You can’t...repeating field sets never appear in the Attributes and Abilities tab... Oh???  but how/where does the inputted data get saved when the character sheet is not in use?? *confused*
Scott C. said: To add on to Finderski's answer, this has absolutely no effect on the ability to use those attributes in macros though. *even more confused* but if I don't know what each string of data in a particular character sheet is called, or what data a string contains, then how do I program my macro to identify a particular data string? For example, if i use a repeating field as an equipment inventory, how can a macro identify an item (such as a weapon) from the total inventory? Thanks for your help, I am trying to get my brain around this problem :P
1547679616
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
there are two ways to reference a repeating attribute. Which one you use depends on where you are trying to call the attribute from. If you are calling the attribute from a roll button within the repeating item, then you just use normal attribute syntax (e.g. @{skill1_name} in your html code above). If someone needs to reference the value from outside the repeating section, then the user uses the programmitcally created name which is in the format repeating_SECTIONNAME_ROWID_ATTRIBUTE_NAME . For your skill1_name attribute, this would be something like repeating_skill_-Jw5Tyou69lkjw9_skill1_name. If you just wanted the first (or second, third, etc.) skill's skill1_name then you can use the relative reference which for the first skill will be  repeating_skill_$0_skill1_name . If you're trying to do something that will total all the values of your repeating section or otherwise have your character sheet reference a repeating attribute form outside the repeating section, then you'll need to use sheetworkers.
Scott C. said: there are two ways to reference a repeating attribute. Which one you use depends on where you are trying to call the attribute from. If you are calling the attribute from a roll button within the repeating item, then you just use normal attribute syntax (e.g. @{skill1_name} in your html code above). If someone needs to reference the value from outside the repeating section, then the user uses the programmitcally created name which is in the format repeating_SECTIONNAME_ROWID_ATTRIBUTE_NAME . For your skill1_name attribute, this would be something like repeating_skill_-Jw5Tyou69lkjw9_skill1_name. If you just wanted the first (or second, third, etc.) skill's skill1_name then you can use the relative reference which for the first skill will be  repeating_skill_$0_skill1_name . If you're trying to do something that will total all the values of your repeating section or otherwise have your character sheet reference a repeating attribute form outside the repeating section, then you'll need to use sheetworkers. Ok Scott...I'm still having trouble with understanding this...please be patient with my ignorance... Lets say (for simplicity sake) I have 3 rows on the repeating skills. The first one is Sword , the second one is Dagger , and the third one is Axe ...note... these could be in any order ! How would a token activated macro looking for the sword identify it? (remember, it could be the 1st, 2nd, or 3rd row)
1547684938
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
If you mean is there a way to say "Roll the sword", there isn't. This is why in the Starfinder sheet, I made a sheetworker to output a chat menu so that people could more easily interface with the sheet without needing to open it for everything.
Scott C. said: If you mean is there a way to say "Roll the sword", there isn't. This is why in the Starfinder sheet, I made a sheetworker to output a chat menu so that people could more easily interface with the sheet without needing to open it for everything. That is exactly what I mean...damn  :( Ok...so plan B just got created...tell me all about......sheetworker??  LMAO  :P 
1547757174
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Sheetworkers are what we call the javascript that can be coded into a character sheet. We call them this because of the special functions that are used to interact with the DOM instead of the typical javascript code to cause changes. I'd recommend looking at codeAcademy or something similar to get a primer on JS, and then reading through the wiki on sheetworkers for what is different about coding JS for character sheets. One important thing that I'll note is that you should either use autocalc fields (aka disabled='true') or sheetworkers, the two do not play well together and in my opinion autocalc fields are purely legacy code at this point as sheetworkers can do everything they can do and more, and do it much better to boot.
Scott C. said: Sheetworkers are what we call the javascript that can be coded into a character sheet. We call them this because of the special functions that are used to interact with the DOM instead of the typical javascript code to cause changes. I'd recommend looking at codeAcademy or something similar to get a primer on JS, and then reading through the wiki on sheetworkers for what is different about coding JS for character sheets. One important thing that I'll note is that you should either use autocalc fields (aka disabled='true') or sheetworkers, the two do not play well together and in my opinion autocalc fields are purely legacy code at this point as sheetworkers can do everything they can do and more, and do it much better to boot. Thanks Scott...I'm looking into it...appreciate your time...cheers