FormBundle
Installation
Installation is quick and easy, 3 steps process
- Install GenemuFormBundle
- Enable the bundle
- 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):
Captcha GD
ReCaptcha (Google library):
Tinymce (download):
JQueryUi (download):
File (uploadify library):
You can use jcrop to uploadify.
You send the image and crop or apply filter.
Image (view demo):
Colorpicker (view demo):
Rating (view demo):
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.
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: api-verify.recaptcha.net
port: 80
path: /verify
timeout: 10
code: ~
proxy:
host: ~ # Required
port: 80
configs: Array
code: ~
server_url: http://api.recaptcha.net
ssl:
use: true
server_url: https://api-secure.recaptcha.net
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
-
added instructions about symfony version compatibilities
By bamarni, 22 days ago
-
updated travis
By bamarni, 22 days ago
-
Revert "Revert "updated deprecated calls""
By bamarni, 22 days ago
-
removed some deprecated calls
By bamarni, 22 days ago
-
[Tokeninput] moved jquery configs to a configs key
By bamarni, 22 days ago
-
prepared 2.2 branch supporting symfony 2.3
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago
-
don't ignore deprecations for the test suite
By bamarni, 22 days ago

