Move array-of-objects functions outside IIFE to make them globally available

The functions were inside the IIFE scope, making them inaccessible from
inline event handlers. Moving them outside the IIFE ensures they're
available on window when the script loads.
This commit is contained in:
Chuck
2026-01-05 14:17:43 -05:00
parent e2b0ab2002
commit 1fa8e6ae50

View File

@@ -3437,11 +3437,6 @@ window.updateKeyValuePairData = function(fieldId, fullKey) {
hiddenInput.value = JSON.stringify(pairs);
};
// Functions to handle array-of-objects
// Define these at the top level (outside any IIFE) to ensure they're always available
if (typeof window !== 'undefined') {
window.addArrayObjectItem = function(fieldId, fullKey, maxItems) {
const itemsContainer = document.getElementById(fieldId + '_items');
const hiddenInput = document.getElementById(fieldId + '_data');
if (!itemsContainer || !hiddenInput) return;