document.addEventListener('DOMContentLoaded', () => { const form = new AvalynxForm('form_validation', { apiParams: {key1: 'value1', key2: 'value2'}, onSuccess: (response) => { alert('Validation successful'); }, onError: (response) => { console.log('Form submission failed:', response); } }); });