Add debug logging to diagnose addArrayObjectItem availability

This commit is contained in:
Chuck
2026-01-05 14:06:55 -05:00
parent be62ac62f9
commit 2993e67eb3

View File

@@ -158,7 +158,7 @@
</div>
<button type="button"
onclick="if (typeof window.addArrayObjectItem === 'function') { window.addArrayObjectItem('{{ field_id }}', '{{ full_key }}', {{ max_items }}); } else { console.error('addArrayObjectItem not available'); }"
onclick="console.log('Button clicked, checking functions:', { addArrayObjectItem: typeof window.addArrayObjectItem, removeArrayObjectItem: typeof window.removeArrayObjectItem, updateArrayObjectData: typeof window.updateArrayObjectData }); if (typeof window.addArrayObjectItem === 'function') { window.addArrayObjectItem('{{ field_id }}', '{{ full_key }}', {{ max_items }}); } else { console.error('addArrayObjectItem not available. Available window functions:', Object.keys(window).filter(k => k.includes('Array'))); }"
class="mt-3 px-4 py-2 text-sm bg-blue-600 hover:bg-blue-700 text-white rounded-md transition-colors"
{% if array_value|length >= max_items %}disabled style="opacity: 0.5; cursor: not-allowed;"{% endif %}>
<i class="fas fa-plus mr-1"></i> Add Feed