Developed with love by KnpLabs Hire us for your project!
517

GenemuFormBundle

by genemu

Extra Form : Captcha GD, Tinymce, Recaptcha, JQueryDate, JQueryAutocomplete, JQuerySlider, JQueryFile, JQueryImage

FormBundle

Build Status

Installation

Installation is quick and easy, 3 steps process

  1. Install GenemuFormBundle
  2. Enable the bundle
  3. Initialize assets

Step 1: Install GenemuFormBundle

Add the following dependency to your composer.json file:
``` json
{
"require": {
"_some_packages": "...",

    "genemu/form-bundle": "2.1.*" => for Symfony 2.1 and 2.2

    "genemu/form-bundle": "2.2.*" => for Symfony 2.3
}

}
```

Step 2: Enable the bundle

Finally, enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Genemu\Bundle\FormBundle\GenemuFormBundle(),
    );
}

Step 3: Initialize assets

$ php app/console assets:install web/

Form types

Select2 (view demo):

View configuration

Captcha GD

View configuration

ReCaptcha (Google library):

View configuration

Tinymce (download):

View configuration

JQueryUi (download):

File (uploadify library):

You can use jcrop to uploadify.
You send the image and crop or apply filter.

View configuration

Image (view demo):

View configuration

Colorpicker (view demo):

View configuration

Rating (view demo):

View configuration

Plain

A Form type that just renders the field as a p tag.
This is useful for forms where certain field need to be shown but not editable.

The type name is genemu_plain.

Tips

Prototype usage within form collections

Template

You use GenemuFormBundle and you seen that it does not work!
Maybe you have forgotten form_javascript or form_stylesheet.

The principle is to separate the javascript, stylesheet and html. This allows better integration of web pages.

View a template example form view

Note

There are maybe some bugs in those implementations, this package is just an idea of form types which can be very useful for your Symfony2 projects.

The MIT license

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
genenu_form:
captcha:
enabled: true
driver: gd
width: 100
height: 30
length: 4
format: png
chars:

# Defaults:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
font_size: 18
grayscale: false
font_color:

# Defaults:
- 252525
- 8B8787
- 550707
- 3526E6
- 88531E
font_dir: %kernel.root_dir%/../web/bundles/genemuform/fonts
fonts:

# Defaults:
- akbar.ttf
- brushcut.ttf
- molten.ttf
- planetbe.ttf
- whoobub.ttf
background_color: DDDDDD
border_color: 000000
code: ~
recaptcha:
enabled: true
public_key: ~ # Required
private_key: ~ # Required
validation:
host: www.google.com
port: 80
path: /recaptcha/api/verify
timeout: 10
code: ~
proxy:
host: ~ # Required
port: 80
configs: Array
code: ~
server_url: http://www.google.com/recaptcha/api
ssl:
use: true
server_url: https://www.google.com/recaptcha/api
tinymce:
enabled: true
theme: advanced
script_url: ~
configs: Array
date:
enabled: true
configs: Array
file:
enabled: true
swf: ~ # Required
cancel_img: /bundles/genemuform/images/cancel.png
folder: /upload
configs: Array
image:
enabled: true
selected: large
filters:

# Defaults:
- rotate
- bw
- negative
- sepia
- crop
thumbnails: Array
autocompleter:
doctrine: true
mongodb: false
tokeninput:
doctrine: true
mongodb: false
autocomplete:
enabled: false
doctrine: true
mongodb: false
select2:
enabled: false
configs: []
  • Merge pull request #342 from mitjade/master
    By genemu, 4 months ago
  • slovenian translation
    By mitjade, 4 months ago
  • slovenian translation
    By mitjade, 4 months ago
  • slovenian translation
    By mitjade, 4 months ago
  • Merge pull request #332 from doughayward0/patch-1
    By genemu, 4 months ago
  • Merge pull request #344 from WedgeSama/master
    By genemu, 4 months ago
  • Merge pull request #345 from Molkobain/patch-1
    By genemu, 4 months ago
  • Merge pull request #346 from WedgeSama/intl-fix
    By genemu, 4 months ago
  • Merge pull request #347 from wysow/fix/recaptcha-translations
    By genemu, 4 months ago
  • Using translation keys in recaptcha validator
    By wysow, 4 months ago
  • Fix bug when intl extension is not installed
    By WedgeSama, 4 months ago
  • Update index.md
    By , 4 months ago
  • Improve Geolocation documentation
    By WedgeSama, 4 months ago
  • slovenian translation
    By mitjade, 5 months ago
  • Update form_prototype.md
    By doughayward0, 6 months ago
  • prepared 2.2.2 release
    By bamarni, 7 months ago
  • Merge pull request #318 from axi/master
    By bamarni, 7 months ago
  • Merge pull request #319 from smatyas/recaptcha-api-url-change
    By bamarni, 7 months ago
  • Update .travis.yml
    By bamarni, 7 months ago
  • removed phpunit
    By bamarni, 7 months ago
  • Merge pull request #303 from romaricdrigon/master
    By bamarni, 7 months ago
  • fixed recaptcha api urls
    By smatyas, 10 months ago
  • Fix recaptcha langage
    By axi, 10 months ago
  • Merge pull request #307 from TheDevilOnLine/master
    By bamarni, 11 months ago
  • Merge pull request #310 from nimbusletruand/master
    By bamarni, 11 months ago
  • Merge pull request #311 from romaricdrigon/fix-form-exception
    By bamarni, 11 months ago
  • Fixed wrong path in exception message
    By romaricdrigon, 11 months ago
  • Fixed: using non-existent FormException
    By romaricdrigon, 11 months ago
  • Update div_layout.html.twig
    By fabiencrassat, 11 months ago
  • Allow language option to be overwritten by application config
    By TheDevilOnLine, 1 year ago