Shopsys Framework custom Symfony form types

v9.1.1 2021-04-19 09:13 UTC

This package is auto-updated.

Last update: 2021-04-20 19:42:57 UTC


Build Status Downloads

Symfony bundle adding form types for usage in Shopsys Framework, its components and plugins.

This repository is maintained by shopsys/shopsys monorepo, information about changes is in monorepo


The plugin is a Symfony bundle and is installed in the same way:


First, you download the package using Composer:

composer require shopsys/form-types


For the bundle to be loaded in your application you need to register it in the app/AppKernel.php file of your project:

// ...
class AppKernel extends Kernel
    public function registerBundles()
        $bundles = [
            // ...
            new Shopsys\FormTypesBundle\ShopsysFormTypesBundle(),
            // ...

        // ...

        return $bundles;

    // ...

How to use a custom form type

The form types in this package are regular Symfony form types. See Symfony Forms Documentation for detailed explanation.



Compound type that renders one form of given type for each domain.

It can be configured via the following options:

  • entry_type - The type of the inner form. Defaults to TextType::class.
  • entry_options - The options of the inner forms. Defaults to [].
  • options_by_domain_id - The options of the inner forms based on the domain ID. Provide arrays indexed by the domain ID, values are merged with the entry_options. Defaults to [].

The data of the inner forms are returned as an array indexed by the domain ID.

MultidomainType usage example


Natural looking choice type for boolean value inputs.

It has no notable options.

A boolean value is accepted/returned as data. A null value can be accepted/returned when no radio button is checked.

YesNoType usage example


Thank you for your contributions to Shopsys Form Types Bundle package. Together we are making Shopsys Framework better.

This repository is READ-ONLY. If you want to report issues and/or send pull requests, please use the main Shopsys repository.

Please, check our Contribution Guide before contributing.


What to do when you are in troubles or need some help? Best way is to contact us on our Slack

If you want to report issues, please use the main Shopsys repository.