Skip to content

Latest commit

 

History

History
71 lines (47 loc) · 1.64 KB

index.md

File metadata and controls

71 lines (47 loc) · 1.64 KB

Sulu Form Bundle

Simple handling from Symfony Forms in Sulu.io.
You can use this Bundle to create and handle static (integrated in a Sulu page or loaded via AJAX) or dynamic forms.

Features

This Bundle will allow the content manager to create custom forms in the backend which can selected with a content type to be displayed at a specific page.

Also this Bundle handles the problem with the CSRF Token and HTTP Cache.
A simple Controller is provided to handle a Symfony Form with CSRF Token.
The mail dispatching is handled by the bundle.

Installation

composer require sulu/sulu-form-bundle

Add to AbstractKernel (app/AbstractKernel.php)

new Sulu\Bundle\FormBundle\SuluFormBundle(),

Config

Add the following config to app/config/config.yml

framework:
    esi: { enabled: true } # use to reload csrf token

sulu_form:
    mail_helper:
        from: %parameter_recommended_for_from%
        to: %parameter_recommended_for_to%

Create Database

Execute following command to update your database

app/console doctrine:schema:update --force

Routing

Add the following lines to app/config/admin/routing.yml

sulu_form_api:
    type: rest
    resource: "@SuluFormBundle/Resources/config/routing_api.yml"
    prefix: /admin/api

Permissions

Make sure you've set the correct permissions in the Sulu backend for this bundle!

Usage

Additional form fields