protected function prepareForFormResponse(bool $withRecaptcha = true, ...$scripts)
    {
        $app = app();

        if ($withRecaptcha) {
            $recaptcha = $app->make(Recaptcha::class);

            $app->make('session')
                ->put('__recaptcha_active', true);
        }

        $this->share([
            'sequence'  => $app->make(Sequence::class),
            'recaptcha' => $recaptcha ?? null,
        ]);

        $this->loadThemerDefaultFormFiles($this->config, $recaptcha ?? null, ...$scripts);
    }
protected function prepareForFormResponse(bool $withRecaptcha = true, ...$scripts)
    {
        $app = app();

        if ($withRecaptcha) {
            $recaptcha = $app->make(Recaptcha::class);

            $app->make('session')
                ->put('__recaptcha_active', true);
        }

        $this->share([
            'sequence'  => $app->make(Sequence::class),
            'recaptcha' => $recaptcha ?? null,
        ]);

        $this->loadThemerDefaultFormFiles($this->config, $recaptcha ?? null, ...$scripts);
    }
protected function prepareForFormResponse ( bool $ withRecaptcha = true , ... $ scripts ) { $ app = app ( ) ; if ( $ withRecaptcha ) { $ recaptcha = $ app -> make ( Recaptcha :: class ) ; $ app -> make ( 'session' ) -> put ( '__recaptcha_active' , true ) ; } $ this -> share ( [ 'sequence' => $ app -> make ( Sequence :: class ) , 'recaptcha' => $ recaptcha ?? null , ] ) ; $ this -> loadThemerDefaultFormFiles ( $ this -> config , $ recaptcha ?? null , ... $ scripts ) ; }
Add parts required for rendering a form

@param bool                          $withRecaptcha
@param array|ThemerFileSettings|null $scripts
@throws \Laranix\Support\Exception\InvalidInstanceException
@throws \Laranix\Support\Exception\InvalidTypeException
Add parts required for rendering a form