2017 © Pedro PelĂĄez
 

symfony-bundle extra-form-bundle

Some enhancements for symfony forms : Collections and javascripts, selects, dependants fields

image

kryptomania/extra-form-bundle

Some enhancements for symfony forms : Collections and javascripts, selects, dependants fields

  • Wednesday, January 10, 2018
  • by kossitk
  • Repository
  • 1 Watchers
  • 0 Stars
  • 53 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 10 Versions
  • 8 % Grown

The README.md

KryptoMania Extra Form Bundle

This bundle provides the possibility to enhance some Symfony native form controls like CollectionType or ChoiceType., (*1)

 , (*2)

Installation

Step1: Install with composer

Run the following composer require command:, (*3)

``` bash $ composer require kryptomania/extra-form-bundle, (*4)


  ### Step 2: Enable the bundle Finally, enable the bundle in the kernel: ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Kryptomania\ExtraFormBundle\KryptomaniaExtraFormBundle(), ); }

Step 3: Add form theme

In config.yml:, (*5)

``` yaml, (*6)

app/config/config.yml

twig: form_themes: - 'KryptomaniaExtraFormBundle:Form:fields.html.twig', (*7)




### Step 4: Include javacript files You will have to include the bundled javacript in your base template file for global use. You can also include it only in the views where you want to use it. ``` html <!-- ExtraForm: CollectionType jQuery plugin --> <script src="{{ asset('bundles/kryptomaniaextraform/js/jquery.km.sfembedforms.js') }}"></script>

Important : This is a jQuery plugin, make sure to inclue jQuery file before.  , (*8)

Usage

For basic usage, in your view:, (*9)

``` twig {# ... #}, (*10)

{{ form_row(form.myCollection) }}

{#  ...  #}


<script language="javacript">
    $(document).ready(function(){
        $("#{{ form.myCollection.vars.id}}").sfEmbedForms();
    });
</script>

```, (*11)

Configuration

'column_header_label' => true, // lorsque les sous-formulaires sont affichĂ©s sous forme de grille, affiche les en-tĂȘtes des colones., (*12)

'single_field_label' => false, // affiche les labels individuels pour chaque champ du formulaire, (*13)

'single_field_label_xs' => true, // affiche les labels individues lorsque la résolution est au niveau xs (768px en suivant la norme bootstrap ), (*14)

'entry_css_class' => 'row', // Pour chaque sous-formulaire quelle classe utiliser pour le wrapper, (*15)

'entry_actions_css_class' => 'form-group text-right col-xs-12', // Pour les actions sur chaque item, (*16)

'column_css_class' => array(), // les classes css de chaque champ de formulaire (affichage en grille), (*17)

The Versions

10/01 2018

dev-master

9999999-dev https://github.com/Kryptomania/ExtraFormBundle

Some enhancements for symfony forms : Collections and javascripts, selects, dependants fields

  Sources   Download

MIT

The Requires

 

collection form entity select fields collectiontype entitytype

10/01 2018

1.2.4

1.2.4.0 https://github.com/Kryptomania/ExtraFormBundle

Some enhancements for symfony forms : Collections and javascripts, selects, dependants fields

  Sources   Download

MIT

The Requires

 

collection form entity select fields collectiontype entitytype

23/12 2017

v1.2.3

1.2.3.0 https://github.com/Kryptomania/ExtraFormBundle

Some enhancements for symfony forms : Collections and javascripts, selects, dependants fields

  Sources   Download

MIT

The Requires

 

collection form entity select fields collectiontype entitytype

22/12 2017

v1.2.2

1.2.2.0 https://github.com/Kryptomania/ExtraFormBundle

Some enhancements for symfony forms : Collections and javascripts, selects, dependants fields

  Sources   Download

MIT

The Requires

 

collection form entity select fields collectiontype entitytype

17/12 2017

v1.2.1

1.2.1.0 https://github.com/Kryptomania/ExtraFormBundle

Some enhancements for symfony forms : Collections and javascripts, selects, dependants fields

  Sources   Download

MIT

The Requires

 

collection form entity select fields collectiontype entitytype

29/10 2017

v1.2.0

1.2.0.0 https://github.com/Kryptomania/ExtraFormBundle

Some enhancements for symfony forms : Collections and javascripts, selects, dependants fields

  Sources   Download

MIT

The Requires

 

collection form entity select fields collectiontype entitytype

22/05 2017

v1.1.0

1.1.0.0 https://github.com/Kryptomania/ExtraFormBundle

Some enhancements for symfony forms : Collections and javascripts, selects, dependants fields

  Sources   Download

MIT

The Requires

 

collection form entity select fields collectiontype entitytype

15/05 2017

v1.0.4

1.0.4.0 https://github.com/Kryptomania/ExtraFormBundle

Some enhancements for symfony forms : Collections and javascripts, selects, dependants fields

  Sources   Download

MIT

The Requires

 

collection form entity select fields collectiontype entitytype

05/05 2017

v1.0.3

1.0.3.0 https://github.com/Kryptomania/ExtraFormBundle

Some enhancements for symfony forms : Collections and javascripts, selects, dependants fields

  Sources   Download

MIT

The Requires

 

collection form entity select fields collectiontype entitytype

30/04 2017

v1.0.2

1.0.2.0

Some enhancements for symfony forms : Collections and javascripts, selects, dependants fields

  Sources   Download

The Requires