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

[CSS] Repeating Section Spell Filtering

I use and work with my own character sheet and have been trying to update it. &nbsp;I was wondering if someone might be able to tell me how to do that fancy spell filtering (based on class level) that I have seen. &nbsp;The Sam's Pathfinder sheet does exactly what I want, except it uses FULL integration with SheetWorkers, I would rather use as little SheetWorkers with the repeating spells as possible until I have it working the way I want it, then I can play around with them. I dont have a gist of my Code, (I couldn't get the link to work) but my code is on my dropbox&nbsp; <a href="https://www.dropbox.com/sh/etb67bzy12nbekx/AAAzTkI" rel="nofollow">https://www.dropbox.com/sh/etb67bzy12nbekx/AAAzTkI</a>... .
1474683137
chris b.
Pro
Sheet Author
API Scripter
If you use &nbsp;radio buttons for spell level instead of a number field then it would work. All the sheet worker does is set a hidden radio button to the same value as the spell level. &nbsp;You can see the hidden radio buttons in the HTML near the top of each row.&nbsp;
1474686295

Edited 1474686339
Toby
Pro
And how exactly would I go about doing this with a single repeating section instead of 10 (one for each spell level). &nbsp;There is a single post in the css wizardry. &nbsp;But it doesn't exactly go into much detail.
1474740845
chris b.
Pro
Sheet Author
API Scripter
This post says exactly how, it is what i copied from when I made it work for pathfinder. <a href="https://app.roll20.net/forum/permalink/3094981/" rel="nofollow">https://app.roll20.net/forum/permalink/3094981/</a>
That was the post I saw, I will try and look at it again to see if I can figure out whats going on. &nbsp;But I still dont see how its pulling the level information from the repeating section in order to show/hide each repeating section. &nbsp;On top of something else I noticed during the night, what happens if a person has more than one spell casting class. You cant have more than one rpeating section, otherwise the compendium (drag and drop) goes kinda nuts. &nbsp;Thank you for the help with this, its one of the last major items for my character sheet overhaul. &nbsp;It is very much appreciated,
Well, I've gotten it, somewhat... I think... I've been experimenting on it since I woke almost 12 hours.&nbsp; And it does sort, except that if you donyt have it set for "All Spells" it wont even show newly added spells to edit.&nbsp; I have yet to figure a way to fix that.&nbsp; Do any of you have any thoughts what might be the problem? I'm a little disappointed, that it I cant get it to sort by what spell class is chosen, and I'm still unsure how I'd set class specific variables, such as Range, Duration CL Check, Concentration and most importantly DC's.&nbsp; But all of that is a problem for another day. Thank you for the help, though I'm sure I'll probably have more questions to ask.&nbsp; G'night all.
1474851215
chris b.
Pro
Sheet Author
API Scripter
sadly you can't sort. to get around adding new spells, what I did was add a spell level "-1" and set that as the default spell level. And in css that one would always be shown no matter what is clicked on. for classes, well filtering is not that hard, you need a dropdown/radio button to choose which class, and the css would be similar, just a seperate set of tabs for the class, and you'd need the seperate hidden checkboxes in side the repeating row for each class. but for calculations.. idk.. until we switched to sheetworkers there were no calculations that depended on spell level. it was too difficult using the auto calc system.
1477712172

Edited 1477712455
Toby
Pro
Well, I've worked on this for over a month and I've gotten it almost right but the problem I have run into is when I hit the +ADD button to create a new spell. &nbsp;Unless the ALL SPELLS tab is displayed the new spell will not show up. &nbsp;Even after all this time I am really not sure how the CSS works to create this. &nbsp;I've found bits and pieces here and there and managed to kinda force something together to get it to work generally how I want. &nbsp;Which is probably the over-all issue. But, perhaps someone who has more experience could tell me what is going on and why it is not working. CSS Code /* Sorting CODE */ div.sheet-section-sp-list { &nbsp; &nbsp; max-height: 999999px; visibility: visible; opacity: 1; transition: opacity 0.5s linear 0s; overflow: hidden; } .charsheet .repcontainer .repitem, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/* A filterbox should look exactly like a repitem. &nbsp;*/ .sheet-filtered-box { &nbsp; &nbsp; padding: 5px 5px 2px 5px; &nbsp; &nbsp; margin: 5px; border: 2px solid #CCCCCC; border-radius: 3px; } .sheet-section-sp-list&gt;fieldset.repeating_spells+.repcontainer&gt;.repitem { &nbsp; &nbsp; /* A repitem within a spellslist should functionally not exist, it's place is taken by a filterbox. */ &nbsp; &nbsp; padding: 0px; &nbsp; &nbsp; margin: 0px; &nbsp; &nbsp; border: none; border-radius:; } .sheet-filtered-box { &nbsp; &nbsp; &nbsp; /* By default, display no items of a filter box */ &nbsp; &nbsp; display: none; } /* second group with wildcard is if HTML5 interferes */ .sheet-tabinput.sheet-tab0:checked + .sheet-tab.sheet-tab0, .sheet-tabinput.sheet-tab1:checked + .sheet-tab.sheet-tab1, .sheet-tabinput.sheet-tab2:checked + .sheet-tab.sheet-tab2, .sheet-tabinput.sheet-tab3:checked + .sheet-tab.sheet-tab3, .sheet-tabinput.sheet-tab4:checked + .sheet-tab.sheet-tab4, .sheet-tabinput.sheet-tab5:checked + .sheet-tab.sheet-tab5, .sheet-tabinput.sheet-tab6:checked + .sheet-tab.sheet-tab6, .sheet-tabinput.sheet-tab7:checked + .sheet-tab.sheet-tab7, .sheet-tabinput.sheet-tab8:checked + .sheet-tab.sheet-tab8, .sheet-tabinput.sheet-tab9:checked + .sheet-tab.sheet-tab9, .sheet-tabinput.sheet-tab10:checked + .sheet-tab.sheet-tab10, .sheet-tabinput.sheet-tab11:checked + .sheet-tab.sheet-tab11, .sheet-tabinput.sheet-tab99:checked ~ .sheet-tab.sheet-tab99 { background:Black; color:White; } /* Decide which specific repitems to display. &nbsp;*/ input.sheet-spells-tab0:checked~.sheet-section-sp-list&gt;fieldset.repeating_spells+.repcontainer&gt;.repitem input.sheet-section-level-0:checked~.sheet-filtered-box, .sheet-spells-tab1:checked~.sheet-section-sp-list&gt;fieldset.repeating_spells+.repcontainer&gt;.repitem input.sheet-section-level-1:checked~.sheet-filtered-box, .sheet-spells-tab2:checked~.sheet-section-sp-list&gt;fieldset.repeating_spells+.repcontainer&gt;.repitem input.sheet-section-level-2:checked~.sheet-filtered-box, .sheet-spells-tab3:checked~.sheet-section-sp-list&gt;fieldset.repeating_spells+.repcontainer&gt;.repitem input.sheet-section-level-3:checked~.sheet-filtered-box, .sheet-spells-tab4:checked~.sheet-section-sp-list&gt;fieldset.repeating_spells+.repcontainer&gt;.repitem input.sheet-section-level-4:checked~.sheet-filtered-box, .sheet-spells-tab5:checked~.sheet-section-sp-list&gt;fieldset.repeating_spells+.repcontainer&gt;.repitem input.sheet-section-level-5:checked~.sheet-filtered-box, .sheet-spells-tab6:checked~.sheet-section-sp-list&gt;fieldset.repeating_spells+.repcontainer&gt;.repitem input.sheet-section-level-6:checked~.sheet-filtered-box, .sheet-spells-tab7:checked~.sheet-section-sp-list&gt;fieldset.repeating_spells+.repcontainer&gt;.repitem input.sheet-section-level-7:checked~.sheet-filtered-box, .sheet-spells-tab8:checked~.sheet-section-sp-list&gt;fieldset.repeating_spells+.repcontainer&gt;.repitem input.sheet-section-level-8:checked~.sheet-filtered-box, .sheet-spells-tab9:checked~.sheet-section-sp-list&gt;fieldset.repeating_spells+.repcontainer&gt;.repitem input.sheet-section-level-9:checked~.sheet-filtered-box, .sheet-spells-tab10:checked~.sheet-section-sp-list&gt;fieldset.repeating_spells+.repcontainer&gt;.repitem input.sheet-section-level-10:checked~.sheet-filtered-box, /* .sheet-section-level-99:checked~.sheet-filtered-box, &nbsp; &nbsp; &nbsp; Always display all spells of circle zero. &nbsp;*/ .sheet-spells-tab99:checked~.sheet-section-sp-list&gt;fieldset.repeating_spells+.repcontainer&gt;.repitem .sheet-filtered-box { /* When tab0 is checked, display everything no matter what which of the inner boxes are checked. */ display: block; } The HTML for the code is: &lt;div class="sheet-spell-list sheet-repeating-sect"&gt; &lt;input type="checkbox" class="sheet-minimize-show sheet-cssbutton" data-i18n-title="minimize-all-cmd" title="Minimize all rows." name="attr_newspells-min-show" value="1" /&gt;&lt;span&gt;&lt;/span&gt; &lt;input type="checkbox" class="sheet-lock-show sheet-cssbutton" data-i18n-title="expand-cmd" title="Collapse or expand all rows." name="attr_newspells-expand-show" value="1" &nbsp;/&gt;&lt;span&gt;&lt;/span&gt; &lt;input type="checkbox" class="sheet-split-column-show sheet-cssbutton" data-i18n-title="column-cmd" title="Split into two columns" name="attr_newspells-column-show" value="1" /&gt;&lt;span&gt;&lt;/span&gt; &lt;br&gt; &lt;input type="radio" name="attr_tab-spells" class="sheet-tab sheet-spells-tab0" value="0" title="Level 0" checked style="margin-left:1px;"/&gt; &lt;span class="sheet-tab sheet-spells-tab0"&gt;Cantrips&lt;/span&gt; &lt;input type="radio" name="attr_tab-spells" class="sheet-tab sheet-spells-tab1" value="1" title="Level 1"/&gt; &lt;span class="sheet-tab sheet-spells-tab1"&gt;Level 1&lt;/span&gt; &lt;input type="radio" name="attr_tab-spells" class="sheet-tab sheet-spells-tab2" value="2" title="Level 2"/&gt; &lt;span class="sheet-tab sheet-spells-tab2"&gt;Level 2&lt;/span&gt; &lt;input type="radio" name="attr_tab-spells" class="sheet-tab sheet-spells-tab3" value="3" title="Level 3"/&gt; &lt;span class="sheet-tab sheet-spells-tab3"&gt;Level 3&lt;/span&gt; &lt;input type="radio" name="attr_tab-spells" class="sheet-tab sheet-spells-tab4" value="4" title="Level 4"/&gt; &lt;span class="sheet-tab sheet-spells-tab4"&gt;Level 4&lt;/span&gt; &lt;input type="radio" name="attr_tab-spells" class="sheet-tab sheet-spells-tab5" value="5" title="Level 5"/&gt; &lt;span class="sheet-tab sheet-spells-tab5"&gt;Level 5&lt;/span&gt; &lt;input type="radio" name="attr_tab-spells" class="sheet-tab sheet-spells-tab6" value="6" title="Level 6"/&gt; &lt;span class="sheet-tab sheet-spells-tab6"&gt;Level 6&lt;/span&gt; &lt;input type="radio" name="attr_tab-spells" class="sheet-tab sheet-spells-tab7" value="7" title="Level 7"/&gt; &lt;span class="sheet-tab sheet-spells-tab7"&gt;Level 7&lt;/span&gt; &lt;input type="radio" name="attr_tab-spells" class="sheet-tab sheet-spells-tab8" value="8" title="Level 8"/&gt; &lt;span class="sheet-tab sheet-spells-tab8"&gt;Level 8&lt;/span&gt; &lt;input type="radio" name="attr_tab-spells" class="sheet-tab sheet-spells-tab9" value="9" title="Level 9"/&gt; &lt;span class="sheet-tab sheet-spells-tab9"&gt;Level 9&lt;/span&gt; &lt;input type="radio" name="attr_tab-spells" class="sheet-tab sheet-spells-tab99" value="-1" title="ALL SPELLS"/&gt; &lt;span class="sheet-tab sheet-spells-tab99"&gt;ALL&lt;/span&gt; &lt;span class="sheet-nontable-name"&gt;&nbsp;&lt;/span&gt; &lt;div class="sheet-table"&gt;&lt;span class="sheet-table-name"&gt;Spell Notes&lt;/span&gt; &lt;div class="sheet-table-row"&gt; &lt;div class="sheet-table-row"&gt;&lt;span class="sheet-table-data sheet-left"&gt;&lt;textarea class="sheet-Feats" title="@{SplNotes}" name="attr_SplNotes" placeholder="Spell Name :: Class :: LVL"&gt;&lt;/textarea&gt;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="sheet-section sheet-section-sp-list sheet-repeating-fields"&gt; &lt;fieldset class="repeating_spells"&gt; &lt;input type="radio" name="attr_spell_level" value="-1" class="sheet-tabcopy sheet-section-level-new" checked="checked" role="presentation"/&gt; &lt;input type="radio" name="attr_spell_level" value="0" class="sheet-tabcopy sheet-section-level-0" role="presentation"/&gt; &lt;input type="radio" name="attr_spell_level" value="1" class="sheet-tabcopy sheet-section-level-1" role="presentation"/&gt; &lt;input type="radio" name="attr_spell_level" value="2" class="sheet-tabcopy sheet-section-level-2" role="presentation"/&gt; &lt;input type="radio" name="attr_spell_level" value="3" class="sheet-tabcopy sheet-section-level-3" role="presentation"/&gt; &lt;input type="radio" name="attr_spell_level" value="4" class="sheet-tabcopy sheet-section-level-4" role="presentation"/&gt; &lt;input type="radio" name="attr_spell_level" value="5" class="sheet-tabcopy sheet-section-level-5" role="presentation"/&gt; &lt;input type="radio" name="attr_spell_level" value="6" class="sheet-tabcopy sheet-section-level-6" role="presentation"/&gt; &lt;input type="radio" name="attr_spell_level" value="7" class="sheet-tabcopy sheet-section-level-7" role="presentation"/&gt; &lt;input type="radio" name="attr_spell_level" value="8" class="sheet-tabcopy sheet-section-level-8" role="presentation"/&gt; &lt;input type="radio" name="attr_spell_level" value="9" class="sheet-tabcopy sheet-section-level-9" role="presentation"/&gt; &lt;input type="radio" name="attr_spell_level" value="99" class="sheet-tabcopy sheet-section-level-99" role="presentation"/&gt; &lt;input type="radio" name="attr_spell_class_r" value="-1" class="sheet-tabcopy sheet-section-spellclass-1" checked="checked" role="presentation"/&gt; &lt;input type="radio" name="attr_spell_class_r" value="0" class="sheet-tabcopy sheet-section-spellclass0" role="presentation"/&gt; &lt;input type="radio" name="attr_spell_class_r" value="1" class="sheet-tabcopy sheet-section-spellclass1" role="presentation"/&gt; &lt;input type="radio" name="attr_spell_class_r" value="2" class="sheet-tabcopy sheet-section-spellclass2" role="presentation"/&gt; &lt;div class="sheet-spell sheet-repeating-fields sheet-filtered-box"&gt; &lt;span class="sheet-error"&gt;&lt;span class="sheet-pictos"&gt;!&lt;/span&gt;&lt;span data-i18n="error-delete-row"&gt;Error! You must delete this row before editing any items in this section.&lt;/span&gt;&lt;/span&gt; &lt;input type="checkbox" name="attr_prepared_state" value="1" class="sheet-section-state" role="presentation"/&gt; &lt;div class="sheet-compendium-drop-target sheet-spell-border sheet-nontable-repeating sheet-background-color1"&gt; &lt;input type="checkbox" class="sheet-counted sheet-sect-show" data-i18n-title="minimize-cmd" title="Minimize Row" name="attr_row-show" value="1" checked="checked" /&gt;&lt;span&gt;&lt;/span&gt; &lt;span class="sheet-repeating-rollbutton"&gt;&lt;button type="roll" name="attr_roll" title="%{selected|repeating_spells_$X_roll}" value="@{macro-text}"&gt;&lt;/button&gt;&lt;/span&gt; &lt;span style="display:none;" class="sheet-repeating-rollbutton"&gt;&lt;button type="roll" name="attr_npc-roll" title="%{selected|repeating_spells_$X_npc-roll}" value="@{npc-macro-text}"&gt;&lt;/button&gt;&lt;/span&gt; &lt;label class="sheet-small-label2 sheet-narrow-numbers"&gt;&lt;input title="@{repeating_spells_$X_used}" type="number" name="attr_used" value="0"&gt;&lt;span style="margin-left:-.5em;" data-i18n="prepared"&gt;Prepared&lt;/span&gt;&lt;/label&gt; &lt;label class="sheet-small-label2 sheet-entry-25p"&gt;&lt;input title="@{repeating_spells_$X_name}" type="text" value="" name="attr_name" placeholder="Spell Name" data-i18n-placeholder="spell-name" accept="Name"&gt;&lt;span data-i18n="name"&gt;Name&lt;/span&gt;&lt;/label&gt; &lt;label class="sheet-small-label2 sheet-sect" style="width:3em;"&gt; &lt;select title="@{repeating_spells_$X_spellclass_number}" name="attr_spellclass_number" style="width:100%;"&gt; &lt;option value="0" selected&gt;0&lt;/option&gt; &lt;option value="1"&gt;1&lt;/option&gt; &lt;option value="2"&gt;2&lt;/option&gt; &lt;/select&gt; &lt;span data-i18n="class"&gt;Class&lt;/span&gt; &lt;/label&gt; &lt;label class="sheet-small-label2 sheet-entry-8p"&gt;&lt;input title="@{repeating_spells_$X_spellclass}" type="text" value="" name="attr_spellclass" /&gt;&lt;span data-i18n="class"&gt;Class&lt;/span&gt;&lt;/label&gt; &lt;label class="sheet-small-label2 sheet-narrow-numbers"&gt;&lt;input title="@{repeating_spells_$X_spell_level}" type="number" value="-1" name="attr_spell_level" /&gt;&lt;span data-i18n="level"&gt;Level&lt;/span&gt;&lt;/label&gt; &lt;input type="checkbox" name="attr_metamagic" value="1" class="sheet-nextitem-show" role="presentation"/&gt;&lt;!-- DC is SET to CASTER CLASS 0 temprarily --&gt; &lt;label class="sheet-small-label2 sheet-narrow-numbers"&gt;&lt;input title="@{repeating_spells_$X_slot}" type="number" value="" name="attr_slot" /&gt;&lt;span data-i18n="slot"&gt;Slot&lt;/span&gt;&lt;/label&gt; &lt;label class="sheet-small-label2 sheet-narrow-numbers"&gt;&lt;input title="@{repeating_spells_$X_savedc}" type="number" value="[[10+[[@{Concentration-0-mod}]][Mod]+@{spell_level}[Spl Level]+[[@{school_dc}]][Focus]+@{DC_misc}[Misc]]]" name="attr_savedc" class="sheet-calc" DISABLED /&gt;&lt;span data-i18n="difficulty-class-abbrv"&gt;DC&lt;/span&gt;&lt;/label&gt; &lt;label class="sheet-small-label2 sheet-entry-15p-shrink"&gt;&lt;input title="@{repeating_spells_$X_school}" type="text" value="" name="attr_school" placeholder="Spell School [descriptor]" data-i18n-placeholder="spell-school-place" accept="School"&gt;&lt;span data-i18n="school"&gt;School&lt;/span&gt;&lt;/label&gt; &lt;label class="sheet-small-label2 sheet-entry-small"&gt; &lt;select title="@{repeating_spells_$X_sr}" name="attr_sr" accept="Spell Resistance"&gt; &lt;option value="" data-i18n="not-applicable-abbrv-default" selected&gt;•N/A&lt;/option&gt; &lt;option value="Yes" data-i18n="yes"&gt;Yes&lt;/option&gt; &lt;option value="No" data-i18n="no"&gt;No&lt;/option&gt; &lt;option value="Yes (Harmless)" data-i18n="save-yes-harmless"&gt;Yes (Harmless)&lt;/option&gt; &lt;option value="No (Harmless)" data-i18n="save-no-harmless"&gt;No (Harmless)&lt;/option&gt; &lt;/select&gt; &lt;span data-i18n="spell-resistance-abbrv"&gt;SR&lt;/span&gt; &lt;/label&gt; &lt;label class="sheet-small-label2 sheet-entry-12p-shrink"&gt;&lt;input title="@{repeating_spells_$X_save}" type="text" value="" name="attr_save" placeholder="Save Effect" data-i18n-placeholder="save-type" accept="Saving Throw"&gt;&lt;span data-i18n="save-effect"&gt;Save Effect&lt;/span&gt;&lt;/label&gt; &lt;label class="sheet-small-label2 sheet-entry-short sheet-sect"&gt; &lt;select class="sheet-select-small" name="attr_range_pick"&gt; &lt;option value="0" selected &gt;Blank&lt;/option&gt;&lt;!-- Blank --&gt; &lt;option value="1"&gt;Close&lt;/option&gt;&lt;!-- Close --&gt; &lt;option value="2"&gt;Medium&lt;/option&gt;&lt;!-- Medium --&gt; &lt;option value="3"&gt;Long&lt;/option&gt;&lt;!-- Long --&gt; &lt;option value="4"&gt;Touch&lt;/option&gt;&lt;!-- Touch --&gt; &lt;option value="5"&gt;Personal&lt;/option&gt;&lt;!-- Personal --&gt; &lt;option value="6"&gt;See text&lt;/option&gt;&lt;!-- See Text --&gt; &lt;option value="7"&gt;Number&lt;/option&gt;&lt;!-- Number --&gt; &lt;option value="8"&gt;Per Level&lt;/option&gt;&lt;!-- Per Level --&gt; &lt;option value="9"&gt;Cannot parse&lt;/option&gt;&lt;!-- Unknown Range --&gt; &lt;/select&gt; &lt;span data-i18n="range"&gt;Range&lt;/span&gt; &lt;/label&gt; &lt;label class="sheet-small-label2 sheet-entry-12p-shrink sheet-sect"&gt; &lt;input type="text" value="" name="attr_range" title="@{range}" placeholder="Flat # or # /level" data-i18n-placeholder="range-custom-place" /&gt; &lt;span style="white-space:nowrap;" data-i18n="range-custom"&gt;Custom Range&lt;/span&gt; &lt;/label&gt; &lt;label class="sheet-small-label2 sheet-sect sheet-number"&gt; &lt;input title="@{repeating_spells_$X_range_numeric}" type="number" value="0" name="attr_range_numeric" placeholder="0" class="sheet-calc" readonly="readonly"&gt; &lt;span data-i18n="range"&gt;Range&lt;/span&gt; &lt;/label&gt; &lt;label class="sheet-small-label2 sheet-entry-15p-shrink sheet-sect"&gt;&lt;input title="@{repeating_spells_$X_targets}" type="text" value="" name="attr_targets" placeholder="Targets/Area/Effect" data-i18n-placeholder="spell-targets-area-effect"/&gt;&lt;span data-i18n="spell-targets-area-effect"&gt;Targets/Area/Effect&lt;/span&gt;&lt;/label&gt; &lt;label class="sheet-small-label2 sheet-entry-12p-shrink sheet-sect"&gt;&lt;input title="@{repeating_spells_$X_duration}" type="text" value="" name="attr_duration" placeholder="Duration" data-i18n-placeholder="duration" accept="Duration"/&gt;&lt;span data-i18n="duration"&gt;Duration&lt;/span&gt;&lt;/label&gt; &lt;label class="sheet-small-label2 sheet-entry-8p"&gt;&lt;input title="@{repeating_spells_$X_cast-time}" type="text" value="" name="attr_cast-time" placeholder="Casting Time" data-i18n-placeholder="spell-casting-time-place" accept="Casting Time"/&gt;&lt;span data-i18n="casting-time-abbrv"&gt;Cast Time&lt;/span&gt;&lt;/label&gt; &lt;label class="sheet-small-label2 sheet-entry-10p-shrink sheet-sect"&gt;&lt;input title="@{repeating_spells_$X_components}" type="text" value="" name="attr_components" placeholder="Components" data-i18n-placeholder="spell-components" accept="Components"&gt;&lt;span data-i18n="spell-components"&gt;Components&lt;/span&gt;&lt;/label&gt; &lt;input type="hidden" value="" name="attr_range_from_compendium" accept="Range"/&gt; &lt;input type="hidden" value="" name="attr_spell_lvlstr" accept="Level"/&gt; &lt;input type="hidden" value="" name="attr_target_from_compendium" accept="Target"/&gt; &lt;input type="hidden" value="" name="attr_area_from_compendium" accept="Area"/&gt; &lt;input type="hidden" value="" name="attr_effect_from_compendium" accept="Effect"/&gt; &lt;input type="hidden" name="attr_spell_options" value="" /&gt; &lt;/div&gt; &lt;/div&gt; &lt;/fieldset&gt; &lt;/div&gt;&lt;!-- End of SP-List --&gt; &lt;/div&gt; I understand this is alot for forum post (vs dropbox or gist), and that some of the content of the repeating section has been stripped to shorten it. &nbsp;But I feel that this is probably the minimum and maximum needed to give a view of whats going on with the repeating section. Thank you in advance for your assistance.
1480613120

Edited 1480614262
Chris D.
Pro
Sheet Author
API Scripter
Compendium Curator
I don't know if you still need help on this or not, but I am the author of the code fragment you are using as a template, and can give you help if you still need it. Sorry I did not notice this thread until today. &nbsp; I do have a fix for making new spells added be the correct level. In the game system I am using, there is no such thing as circle zero spells, so I made zero my default value, Anything that was still circle zero was a brand new spell that had not been assigned a circle yet. &nbsp;If your game system allows level zero spells, then you could make your "unassigned" number -1 or any other otherwise invalid number.&nbsp; You will notice in the css, that any spell that is circle zero is always displayed, no matter which tab is checked.&nbsp; So if "Level 3" is checked, then it displays only those spells that are level 0 or level 3. &nbsp; Once again, if you are using level 0 as a valid level, then you can change it so that level -1 and 3 are displayed.&nbsp; In your code you took this line out, probably because level zero spells were valid in your system, and you wanted to filter to display them. Once again, what you need to do is have it always display the "brand new unassigned" spells. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* Decide which specific repitems to display. &nbsp;*/ input.sheet-spells-tab0:checked~.sheet-filtered-box, &nbsp; &nbsp; &nbsp;/* Always display all spells of circle zero. &nbsp;*/ .sheet-spells-tab0:checked~.sheet-section-sp-list&gt;fieldset.repeating_spell+.repcontainer&gt;.repitem .sheet-filtered-box, &nbsp;/* When tab0 is checked, display everything no matter what which of the inner boxes are checked. */ .sheet-spells-tab1:checked~.sheet-section-sp-list&gt;fieldset.repeating_spell+.repcontainer&gt;.repitem input.sheet-spells-tab1:checked~.sheet-filtered-box, So what happens is that if you are displaying only level 3 spells, and you add a new spell, it will have a level of zero (or -1 in your version), and the new blank spell will be displayed along with level 3 spells. I have sheetworker section with the following line.&nbsp; on("change:repeating_spell:sp_name", fn(repSpellName ) ); Part of the code inside of that is &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var t = getInt( values, "tab-spells"); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(( circle &nbsp;== 0) && (t != 0)) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; circle = t; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vals[ strS1 ] = circle; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } Which is to say, that whenever the spell name changes, check to see if the circle has been set to a valid rank. If it is still at the "new spell" circle, then check to see if we are only displaying spells of a curtain level. If so, make the new spell to be that level.&nbsp; Thus, if you are only displaying level 3 spells, and you change a spell name of a spell that is listed as being unassigned, change the spells rank to be 3. This fragment is obviously not complete, my code does several other things as well, but it should get you started if you already know about sheetworkers. Your top post sais you did not want to use them, so ... Anyway, this step is optional, but if you want it I can give you the whole routine and you can cut out all the parts you don't need. This last step is optional, as the user can manually assign the spell to any rank that he wants, but it does save a stop, if he is only displaying one level of spells, he presses add, a blank spell appears, he sets the name, and the level of the spell automaticaly changes to that level.&nbsp; Please let me know if there is anything more I help you with.&nbsp;