
Hard question for a problem I was thinking simple. Here, i'm try to filter injuries, my game have more of 100 differents. So I use a selector for the "area" (zone) and another for the "kind" (type). Its in french, but its mainly part of the body and kind of weapons. Problem is that I was using (in the same situation but oustide of repeating) class to show/hide options. If I choose "jambe" so every other sheet-(area) than sheet-jambe, I was addClass sheet-hidden and removeClass sheet-hidden to the one selected. And same for the kind of injuries. There is the HTML. < fieldset id = "BLESSURES" class = "repeating_blessures" > < div class = "sheet-blessure-section" > < select type = "text" name = "attr_blessure-zone" class = "sheet-150" > < option class = "sheet-nothidden" selected value = "none" >✗</ option > < option type = "text" value = "jambe" >Jambe</ option > < option type = "text" value = "bras" >Bras</ option > < option type = "text" value = "torse" >Torse</ option > < option type = "text" value = "tete" >Tête</ option > < option type = "text" value = "special" >Spécial</ option > < option type = "text" value = "permanente" >Perma.</ option > </ select > < select type = "text" name = "attr_blessure-type" class = "sheet-200" > < option class = "sheet-nothidden" selected value = "none" >✗</ option > < option value = "contendant" >Contendant</ option > < option value = "tranchant" >Tranchant</ option > < option value = "perforant" >Perforant</ option > </ select > < select type = "text" name = "attr_blessure-name" class = "sheet-300" > < option class = "sheet-nothidden" selected value = "none" >✗</ option > < option class = "sheet-jambe sheet-contendant" >Jambe 1</ option > < option class = "sheet-jambe sheet-perforant" >Jambe 2</ option > < option class = "sheet-jambe sheet-tranchant" >Jambe 3</ option > < option class = "sheet-bras sheet-contendant" >Bras 1</ option > < option class = "sheet-bras sheet-perforant" >Bras 2</ option > < option class = "sheet-bras sheet-tranchant" >Bras 3</ option > < option class = "sheet-torse sheet-contendant" >Torse 1</ option > < option class = "sheet-torse sheet-perforant" >Torse 2</ option > < option class = "sheet-torse sheet-tranchant" >Torse 3</ option > < option class = "sheet-tete sheet-contendant" >Tête 1</ option > < option class = "sheet-tete sheet-perforant" >Tête 2</ option > < option class = "sheet-tete sheet-tranchant" >Tête 3</ option > < option class = "sheet-special sheet-contendant" >Special 1</ option > < option class = "sheet-special sheet-perforant" >Special 2</ option > < option class = "sheet-special sheet-tranchant" >Special 3</ option > < option class = "sheet-permanente sheet-contendant" >Permnante 1</ option > < option class = "sheet-permanente sheet-perforant" >Permnante 2</ option > < option class = "sheet-permanente sheet-tranchant" >Permnante 3</ option > </ select > < input type = "number" name = "attr_blessure_itt" value = "0" class = "sheet-35" > </ div > </ fieldset > My issue is that in a repeating section, I'm unable to make the difference between class. In the line 1, 3 or 10, sheet-(area) will still be sheet-(area) and so I'm unable to correctly sort my injuries. I've try many things, but I don't sucessfully reach my goal. When I'm targetting blessure-name wich is the select where the options are, I'm only able to get the value of it. I'm looking for any idea you can have for solve that. And if you know how to call only the options wich are in the select repeating_blessure_${id}_blessure-name, it may help that ? :/ Here is my actuel JS, wich is like unfinished :/ < script id = "✓-SCRIPTCALC : BLESSURES" type = "text/worker" > on("change:repeating_blessures", function(eventInfo) { getSectionIDs("repeating_blessures", function(ids) { console.log("IDs des lignes existantes : " + ids.join(", ")); ids.forEach(function(id) { var sheetBlessureZoneId = `repeating_blessures_${id}_blessure-zone`; var sheetBlessureTypeId = `repeating_blessures_${id}_blessure-type`; var sheetBlessureNameId = `repeating_blessures_${id}_blessure-name`; getAttrs([sheetBlessureZoneId, sheetBlessureTypeId, sheetBlessureNameId], function(values) { var choosenZone = values[sheetBlessureZoneId] || ''; var choosenType = values[sheetBlessureTypeId] || ''; var choosenName = values[sheetBlessureNameId] || ''; console.log(`ID : ${id} - Zone / Type / Name : ${choosenZone} / ${choosenType} / ${choosenName}`); const zoneOptions = ['jambe', 'bras', 'torse', 'tete', 'special', 'permanente']; const typeOptions = ['contendant', 'tranchant', 'perforant']; zoneOptions.forEach(function(zone) { const zoneOptionClass = `.sheet-${zone}`; const zoneOptionDiv = $20(zoneOptionClass); if (zone === choosenZone) { zoneOptionDiv.removeClass('sheet-hidden'); } else { zoneOptionDiv.addClass('sheet-hidden'); } }); typeOptions.forEach(function(type) { const typeOptionClass = `.sheet-${type}`; const typeOptionDiv = $20(typeOptionClass); if (type === choosenType) { typeOptionDiv.removeClass('sheet-hidden'); } else { typeOptionDiv.addClass('sheet-hidden'); } }); }); }); }); }); </ script >