PHP code example of alengo / alengo-form-bundle

1. Go to this page and download the library: Download alengo/alengo-form-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

alengo / alengo-form-bundle example snippets


 return [
     /* ... */
     Alengo\Bundle\AlengoFormBundle\AlengoFormBundle::class => ['all' => true],
 ];
 

   public function saveFormDataFromRequest(array $data, string $webspace, string $location, string $category, string $receiverMail = NULL, bool $copy = false): FormData;

 

    public function sendFormDataAsMail(FormData $formData, string $template, string $title, string $receiverMail,string $senderMail,$xmlTemplate = false);
 

$formData = $this->saveForm->saveFormDataFromRequest($request->request->all(),$request->get('_sulu')->getAttribute('webspace')->getKey(),$request->getLocale(),'contact',NULL,true);
$this->sendForm->sendFormDataAsMail($formData,'hello/email.txt.twig','Welcome Mail','[email protected]');