spyFormBuilderInterface2Plugin
0.2.0beta
for sf 1.2 MIT
An new version of spyFormBuilderInterfacePlugin all rewrited with widgets, validator ...
Now at github : https://github.com/cedriclombardot/spyFormBuilderInterface2Plugin/
Developers
License
MIT http://www.symfony-project.com/license
(c) Cédric Lombardot <cedric.lombardot <<at>> spyrit.net> http://lombardot.fr
http://symfony.spyrit.net && http://www.spyrit.net
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.
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

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

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