• Contact & Démo
    Contactez-nous pour toute question ou pour en savoir plus sur nos solutions. Nous serons ravis de vous conseiller gratuitement et sans engagement.
    .form__disable {
      opacity: 50%;
      pointer-events: none;
    }
    document.addEventListener('DOMContentLoaded', function() {
            const emailField = document.querySelector('input[name="form__email"]');
            const submitButton = document.querySelector('.submit-button-wrapper');
            if (emailField) {
                disableButton();
                emailField.addEventListener('input', function () {
                    console.log('Wywołano Event Listener "Input"');
                    const email = emailField.value;
                    if (isValidEmail(email)) {
                        console.log('Email poprawny');
                        activateButton()
                    } else {
                        console.log('Email niepoprawny');
                        disableButton();
                    }
                });
                console.log('Dodano event listener');
    
                function isValidEmail(email) {
                    const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
                    return emailRegex.test(email);
                }
    
                function disableButton() {
                    if(!submitButton.classList.contains('form__disable')) {
                        submitButton.classList.add('form__disable')
                    }
                }
    
                function activateButton() {
                    if(submitButton.classList.contains('form__disable')) {
                        submitButton.classList.remove('form__disable')
                    }
                }
            }
    
    
        })
    Coordonnées
    Berlin, Allemagne
    Kochannstraße 6
    10249 Berlin
    Allemagne
    Tél. 1 : +49-30-549-053-74
    Tél. 2 : +49-30-549-053-75
    Poznań, Pologne
    Wawrzyńca Engeströma 10

    60-571 Poznan

    Pologne
    Tél. : +48-61-88577-00
    Fax : +48-61-88577-15
    www.crowdworx.com
    Get your free demo
    With CrowdWorx, we have been able to take our idea and innovation management to a new level.
    By continuing, you accept our privacy policy.
    Choose your language: