obNiceFormsPlugin - 1.0.1

**obNiceFormsPlugin** is a symfony plugin that provides the NiceForms Forms render based on the [NiceForms 2.0 javascript library](http://www.emblematiq.com/projects/niceforms/).

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Releases Changelog Contribute
Show source

obNiceFormsPlugin

obNiceFormsPlugin is a symfony plugin that provides the NiceForms Forms render based on the NiceForms 2.0 javascript library.

It adds a new helper file : niceFormsHelper with a special form_tag function :

  • nice_form_tag, form_tag helper to set the "niceform" class

Installation

Install the plugin (sf 1.0.x)

$ symfony plugin-install http://plugins.symfony-project.com/obNiceFormsPlugin

Set the theme app.yml:

all:
  nice_forms:
    theme:                                        "default" # default theme

Clear the cache

    $ symfony cc

Usage

1 - set a base tag in your head section for your siteWeb base reference content

<head>
  ...
  <base href="http://www.your-base-ref.com/web/" />
  ...
</head>

2 - Declare the helper

<?php use_helper('niceForms'); ?>

3 - To display a Nice form

# Use the usual options as form_tag
<?php echo nice_form_tag('module/action', array('id' => 'my_form', 'name' => 'my_form')) ?>

4 - Create your own theme

For this you need to create new theme folders under the plugin web/ directory.
Duplicate each default theme directory and rename them in "myTheme"

- obNiceFormsPlugin/web/css/myTheme/niceforms.css
- obNiceFormsPlugin/web/js/myTheme/niceforms.js
- obNiceFormsPlugin/web/images/myTheme/

Then 

- change path to images in niceforms.css
- change var imagesPath in niceforms.js
- create your own images package with the help of the default.psd template

That's all [OB]

Versions

  • 1.0.1

    • First version
  • 1.0.0

    • First version

TODO

  • Admin generator compatibility