Download the PHP package linio/dynamic-form-bundle without Composer

On this page you can find all versions of the php package linio/dynamic-form-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dynamic-form-bundle

Dynamic Form Bundle

Latest Stable Version License Build Status Scrutinizer Code Quality

Generates symfony forms based on YAML configuration files

Getting Started

This plugin supports Symfony ^2.8|^3.0|^4.0|^5.0. Even tough we encorage you to use the latest version because of the Symfony maintained branches itself.

The recommended way to install Linio Dynamic Form Bundle is through composer.

Tests

To run the test suite, you need install the dependencies via composer, then run PHPUnit.

$ composer install
$ vendor/bin/phpunit

Usage

Add the bundle on registerBundles() at AppKernel.php

The service dynamic_form.factory will be available.

Create your form on the Configuration File. The YAML structure for the Form should follow the next structure:

The method createform() takes the form configuration named new_user from app/config/config.yml.

The method getJsonConfiguration() takes the configuration from app/config/config.yml. and returns a JSON with the Form Configuration.

Example

Here's an example of a form named new_user with a single field called first_name:

Options

Field options are the same as symfony, refer to the documentation

Birthday Type

Supports Symfony >= 4.4.

In addition to the own options that the field brings by default (see documentation), we added 3 new attributes to make its behavior more flexible.

minAgeAllowed and maxAgeAllowed:

These options work together and it is an improvement to the years option because it is too strict to only receive an array with the allowed years (and that in our case we should leave static in our Yaml file). With them we can determine (taking the current date) the minimum and maximum number of ages to generate the years that will be displayed in the form. These options only accept whole numbers greater than or equal to zero.

For example, if we want to have a field of type birthday but we only want children who have between 5 and 10 years of life to be registered, we would have something like the following:

The above would generate this array of years => [2016, 2015, 2014, 2013, 2012, 2011] taking into account 2021 as the current year.

Order:

This option is used together with minAgeAllowed and maxAgeAllowed and is for the cases where we want to show our drop-down list of years in one order or another. The accepted values are asc and desc, the latter by default.

Transformers

When using transformers write both the class where it is defined and the calls you need.

Validators

When using validators call each validator constraint and its parameters like shown down below.


All versions of dynamic-form-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
symfony/form Version ^2.8 || ^3.0 || ^4.0 || ^5.0 || ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package linio/dynamic-form-bundle contains the following files

Loading the files please wait ....