![]() |
|
csFormTransformPlugin - 1.0.0Uses the Jquery Transform library to automatically render your forms for a web 2.0 look |
|
This plugin allows you to provide a quick web 2.0 look to your forms using the jQuery jqtransform plugin
Requirements: Included jQuery Library on the page
First set your form's formatter by adding the following code to your form's setup() method:
public function configure() { ... $formatter = new csWidgetFormSchemaFormatterJQTransform($this->widgetSchema); $this->widgetSchema->addFormFormatter('cs-formatter', $formatter); $this->widgetSchema->setFormFormatterName('cs-formatter'); }
Alternatively, place the code above in your Base Form in a method, for example setJQFormatter(),
and then call this method in any form you want to format in this way.
Second add use_helper('FormTransform'); to your view where you are displaying your form.
Third add the class jqtransform to the form or forms you want to be transformed.
And you're done!
You can add/override the javascripts / stylesheets included in this plugin by overriding the plugin's app.yml:
all:
csFormTransformPlugin:
stylesheets: ['/csFormTransformPlugin/css/jqtransform.css']
javascripts: ['/csFormTransformPlugin/js/jquery.jqtransform.js']
This allows you to easily give your transformed forms custom styles