2017 © Pedro Peláez
 

symfony-bundle sonata-form-builder

A drag&drod form builder for sonata admin

image

pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  • Wednesday, September 13, 2017
  • by pixart
  • Repository
  • 3 Watchers
  • 7 Stars
  • 478 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 8 Forks
  • 0 Open issues
  • 22 Versions
  • 0 % Grown

The README.md

Sonata Form Builder

A Drag & Drop Form builder inspired from the Git package https://github.com/minikomi/Bootstrap-Form-Builder and adapted for Sonata-Admin with bootstrap v3 and Jquery, (*1)

You need Bootstrap v3 and Jquery on your Javascript/CSS requirements and a recent Sonata Admin installation., (*2)

Screenshot, (*3)


Install the bundle

Step 1: Download the bundle

You can download and put on your /src directory (like this src/Pirastru/FormBuilderBundle) or insert on your vendor directory with the follow command :, (*4)


php -dmemory_limit=1G ./composer.phar require pirasterize/sonata-form-builder

If you have a >minimum-stability< error is because your symfony installation accept only stable packages. Edit composer.json file and change "minimum-stability" from "stable" to "dev" :, (*5)

    ...
    "minimum-stability": "dev",
    ...

Step 2: Enable the bundle

Insert the follow line on your AppKernel.php in your symfony :, (*6)


class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Gregwar\CaptchaBundle\GregwarCaptchaBundle(), new Pirastru\FormBuilderBundle\PirastruFormBuilderBundle() ); // ... } // ... }

Step 3: Configuration

Add the following configuration to your app/config/config.yml:, (*7)

``` yml, (*8)

gregwar_captcha: ~


Add the following configuration to your `app/config/parameters.yml`: ``` yml formbuilder_email_from: jeanmichel@basquiat.com

Step 4: Setup the database schema


$php app/console doctrine:schema:update --force

Step 5: Setup the routing

Append the following code to app/config/routing.yml or better to separate app/config/routing_admin.yml :, (*9)


sonata_form_builder: resource: '@PirastruFormBuilderBundle/Controller/FormBuilderController.php' type: annotation

Step 6: Sonata admin setup

In order to have on your list of Admin entities the Form Builder you must put on your configuration file (this case app/config/sonata/sonata_admin.yml), inside of the directive of 'sonata_admin' the follow code :, (*10)


sonata_admin: .... dashboard: .... groups: ... sonata.admin.group.formbuilder: label: Form Builder items: - pirastru_form_builder.admin

Step 7: Sonata blocks setup

In order to have on the list of blocks the Form Builder Block available on a page put on your configuration file (app/config/sonata/sonata_block.yml) the follow line :, (*11)

``` yml, (*12)

sonata_block: .... blocks: .... pirastru_form_builder.block:, (*13)


###Step 8: Install assets Run the follow command on your console to install assets : ```sh $php app/console assets:install

To see the result

Check on your Sonata Admin Entities you should see the 'Form Builder' Menu than create a new drag&drop form. After that create a page from sonata page or edit an existing one and put from the list of available blocks the block called "Form Builder Drag&Drop". On Options choose the Form you just created, and take a look on the page., (*14)

Building the bootstrap form builder

Install RequireJS, (*15)

npm install -g requirejs

And run following command in directory Resources/public/BootstrapFormBuilder:, (*16)

r.js -o assets/js/lib/build.js

Todo

  • Fields in differents sizes
  • Translations
  • tests
  • remove form fields that are not needed in export - Button/Captcha/Privacycheck

The Versions

13/09 2017

dev-master

9999999-dev https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

13/09 2017

v0.20

0.20.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

13/09 2017

v0.19

0.19.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

09/06 2017

v0.18

0.18.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

14/02 2017

v0.17

0.17.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

14/02 2017

v0.16

0.16.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

14/02 2017

v0.15

0.15.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

14/02 2017

v0.14

0.14.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

08/02 2017

v0.13

0.13.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

06/02 2017

v0.12

0.12.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

06/02 2017

v0.11

0.11.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

03/02 2017

v0.10

0.10.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

02/02 2017

v0.9

0.9.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

02/02 2017

v0.8

0.8.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

02/02 2017

v0.7

0.7.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

02/02 2017

v0.6

0.6.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

02/02 2017

v0.5

0.5.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

31/01 2017

v0.4

0.4.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

09/12 2016

v0.3

0.3.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

24/11 2016

v0.2

0.2.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

24/11 2016

v0.1.1

0.1.1.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder

24/11 2016

v0.1

0.1.0.0 https://github.com/pirasterize/sonata-form-builder

A drag&drod form builder for sonata admin

  Sources   Download

MIT

The Requires

 

by Andrea Pirastru

form symfony2 admin sonata project drag drop builder