public function generateAndIncludeInlineJavaScript()
    {
        $formName = $this->assetHandlerFactory->getFormObject()->getName();

        $javaScriptCode = $this->getFormRequestDataJavaScriptAssetHandler()
            ->getFormRequestDataJavaScriptCode();

        if (ExtensionService::get()->isInDebugMode()) {
            $javaScriptCode .= LF . $this->getDebugActivationCode();
        }

        $uri = $this->getAjaxUrl();

        $javaScriptCode .= LF;
        $javaScriptCode .= <<<JS
Fz.setAjaxUrl('$uri');
JS;

        $this->addInlineJs('FormZ - Initialization ' . $formName, $javaScriptCode);

        return $this;
    }
public function generateAndIncludeInlineJavaScript()
    {
        $formName = $this->assetHandlerFactory->getFormObject()->getName();

        $javaScriptCode = $this->getFormRequestDataJavaScriptAssetHandler()
            ->getFormRequestDataJavaScriptCode();

        if (ExtensionService::get()->isInDebugMode()) {
            $javaScriptCode .= LF . $this->getDebugActivationCode();
        }

        $uri = $this->getAjaxUrl();

        $javaScriptCode .= LF;
        $javaScriptCode .= <<<JS
Fz.setAjaxUrl('$uri');
JS;

        $this->addInlineJs('FormZ - Initialization ' . $formName, $javaScriptCode);

        return $this;
    }
public function generateAndIncludeInlineJavaScript ( ) { $ formName = $ this -> assetHandlerFactory -> getFormObject ( ) -> getName ( ) ; $ javaScriptCode = $ this -> getFormRequestDataJavaScriptAssetHandler ( ) -> getFormRequestDataJavaScriptCode ( ) ; if ( ExtensionService :: get ( ) -> isInDebugMode ( ) ) { $ javaScriptCode .= LF . $ this -> getDebugActivationCode ( ) ; } $ uri = $ this -> getAjaxUrl ( ) ; $ javaScriptCode .= LF ; $ javaScriptCode .=  <<<JS
Fz.setAjaxUrl('$uri');
JS ; $ this -> addInlineJs ( 'FormZ - Initialization ' . $ formName , $ javaScriptCode ) ; return $ this ; }
Here we generate the JavaScript code containing the submitted values, and
the existing errors, which is dynamically created at each request.

The code is then injected as inline code in the DOM.

@return $this
Here we generate the JavaScript code containing the submitted values and the existing errors which is dynamically created at each request .