PHP code example of fire1 / ax-form-bundle

1. Go to this page and download the library: Download fire1/ax-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/ */

    

fire1 / ax-form-bundle example snippets


return [
    // ...
    Fire1\AxFormBundle\Fire1AxFormBundle::class => ['all' => true],
];

// In a Controller extending AbstractAxFormController
public function new(): Response
{
    $form = $this->formPage(Task::class, 'task');

    return $form
        ->title('Create New Task')
        ->do(TaskType::class, function (Task $task, AxFormService $form) {
            $form->record();
            return $form->redirectByReferer();
        });
}
twig
{{ ax_form_modal() }}