The principe of spyFormBuilderInterface2Plugin is to help you to create forms with your admin
PHP JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


# 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.


### 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]( "spyFormBuilderInterface Preview")

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

#### The actions principe

![principe of actions]( "spyFormBuilderInterface Action 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


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