diff --git a/options/options.html b/options/options.html
index 4b2694a..5deb398 100644
--- a/options/options.html
+++ b/options/options.html
@@ -108,7 +108,7 @@
.map-row.has-const .map-left { flex: 0 0 250px; }
.map-right { display: none; flex: 1 1 auto; min-width: 0; }
.map-row.has-const .map-right { display: flex; align-items: center; }
- .map-left select, .map-right input { width: 100%; padding: 7px 9px; }
+ .map-left select, .map-left input, .map-right input { width: 100%; padding: 7px 9px; }
.map-hint { font-size: 11px; letter-spacing: .4px; text-transform: uppercase;
color: var(--muted); font-weight: 600; margin: 2px 2px 8px; }
.icon-btn {
@@ -222,6 +222,8 @@
DocuWare-Feld → Mail-Attribut · fester Wert
+
+
diff --git a/options/options.js b/options/options.js
index 2130a26..aefc7d7 100644
--- a/options/options.js
+++ b/options/options.js
@@ -172,23 +172,26 @@ function mapValueState(value) {
return { sel: "", konst: "" };
}
-// Befüllt ein Feldname-Dropdown mit den Archiv-Feldern + dem aktuellen Wert (bleibt erhalten).
-function fillFieldSelect(sel, current) {
- sel.innerHTML = "";
- const empty = document.createElement("option");
- empty.value = ""; empty.textContent = "— Feld wählen —";
- sel.appendChild(empty);
- [...new Set([...(availableFields || []), current].filter(Boolean))].sort().forEach((n) => {
- const o = document.createElement("option");
- o.value = n; o.textContent = n;
- sel.appendChild(o);
- });
- sel.value = current || "";
+// Vorschläge für die Feldname-Eingaben: Felder des gewählten Archivs, dazu die
+// Standard-Feldnamen und alles schon Eingetragene. Der Archiv-Teil ist erst nach
+// Anmeldung + Archivwahl da – ohne die beiden anderen Quellen stünde man vorher
+// vor einer leeren Liste.
+function fieldSuggestions() {
+ const used = [...document.querySelectorAll("#mapBody .map-field")].map((i) => i.value);
+ const all = [...(availableFields || []), ...Object.keys(DEFAULT_FIELD_MAP), ...used];
+ return [...new Set(all.filter(Boolean))].sort();
}
-// Aktualisiert alle Feldname-Dropdowns auf die aktuelle Archiv-Feldliste (Auswahl bleibt).
+// Baut die gemeinsame