Flexi Contact

A Flexible and Configurable Contact Form to Add to any Page

Back to Flexi Contact Support

Tim
Tim

change the component to following:

    public function onRun(){

        if($this->property('injectBootstrapAssets') == true){
            $this->addCss('assets/css/bootstrap.css');
            $this->addJs('assets/js/bootstrap.js');
        }

        $this->addJs('https://www.google.com/recaptcha/api.js');

        if($this->property('injectMainScript') == true) {
            $this->addJs('assets/js/main.js');
        }
    }

=>

    public function onRun(){

        if($this->property('injectBootstrapAssets') == true){
            $this->addCss('assets/css/bootstrap.css');
            $this->addJs('assets/js/bootstrap.js');
        }

        if($this->enableCaptcha()) {
            $this->addJs('https://www.google.com/recaptcha/api.js');
        }

        if($this->property('injectMainScript') == true) {
            $this->addJs('assets/js/main.js');
        }
    }

1-1 of 1