spyFormBuilderInterface2Plugin - 0.2.0

An new version of spyFormBuilderInterfacePlugin all rewritable with widgets, validator ...

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

spyFormBuilderInterface2Plugin

The principe of spyFormBuilderInterface2Plugin is to help you to create forms with your admin

You could also Install

To Help you to regenerate your model if you use storeInPropel you could install sfPropelSqlDiffPlugin

Basic Configurations

In your front enable the module :

enable_modules: [ ..., spyFormBuilderInterfaceFront ]

In your backend :

enable_modules: [ ..., spyFormBuilderInterface, spyFormBuilderInterfaceActions, spyFormBuilderInterfaceFields, spyFormBuilderInterfaceTemplate, spyFormBuilderInterfaceValidate ]

You have to enable i18n also.

CHANGELOG

sfExtraWidgetsPlugin

* Now support captcha if you install sfExtraWidgetsPlugin (don't forget required and captcha validator)
* DatePicker
* SpinWidget

How to use

spyFormBuilderInterface Module

preview of spyFormBuilderInterface

The spyFormbuilderInterface module is the module that you need to call to manage your forms

Call this one, creates your fields, yours action, customise your template and enjoy it !

Use the generated form

If you don't want to use the code of spyFormBuilderInterfaceFront

You could do this calls :

$this->formulaire=new spyForm($id,$datas);
  • $id is the numeric id or the name of the form
  • $datas is the array of the data if you have use the storeInPropelAction, you cold set $datas[id] with the row of the Id

And in you tpl

$formulaire->render();

The actions principe

principe of actions

How to personalize the template for the form

Like for sfForms

Exisitings wigets

For the moment this realease contains not a lot of widgets, but in the next realease the list will go to increase

  • Input_text Tags : sfWidgetFormInput
  • select_tag : spyWidgetFormSelect based on sfWidgetFormSelect
  • radio_group : spyWidgetFormSelectRadio based on sfWidgetFormSelectRadio
  • date with selects : sfWidgetFormDate
  • textarea : sfWidgetFormTextarea

Exisitings validators

You could use %value% et %parameter_name% in your errors message like for sfForms

  • required : sfValidatorRequired
  • max length for string: sfValidatorLengthString
  • min legnth : sfValidatorLengthString
  • email : sfValidatorEmail

Exisitings actions

  • store in propel object : spyActionStoreInPropel
  • send an email : spyActionSendMail for the moment only with default.tpl
  • Redirect : spyActionRedirect
  • Redirect to the edit action : spyActionRedirectToEdit with spyActionStoreInPropel executing before or a $datas[id] getted
  • conditionnals actions spyActionConditionnalStart : TO add a conditionnal actions the php code must return a boolean
  • end of conditionnals actions : spyActionConditionnalEnd End of a condition

TODO

  • Adding fields / validators / actions
  • Check the validations of admin form
  • Documentation for developpers
  • import and export systems
  • Ajax sort for fields and actions