Development

spyFormBuilderInterfacePlugin

You must first sign up to be able to contribute.

Version 5 (modified by cedric, 10 years ago)
--

spyFormBuilderInterfacePlugin 0.1 Beta 1

A simple interface to create forms with an administration interface. Preview of the interface For the first version you can :

Create this fields:

  • text
    • with field size
  • textarea
    • with a number of rows
    • a number of cols
    • and the possibility to activate tiny_mce
  • button
    • with one javascript action onclick
  • submit
  • file
    • it will upload the file in the sf_upload_dir with the name time().{filename}
  • static_text
    • to put html elements (like css or heading text)
  • fieldset_start
    • to start a fieldset
  • fieldset_end
    • to end a fieldset
  • checkboxes
    • to create a group of checkbox
  • radiogroup
    • to create a group of radios
  • select
    • to create select with single or multiple options
    • you can also choose the numbers of rows for multiple
  • reset
  • send_mail
    • this field allow you to configure an mail adress to receive the results of the forms. It's require PEAR::Mail_Mime and dependances
  • save_to_database
    • this field will activate de storing system in the database
  • redirect
    • this field will redirect the page when the forms will be valid

Add this validation

For the validations i have a bug for the moment for file fields

For the 3 first the system have Js Validator System, and all have a PHP validating Method

Requirements

Symfony 1.O I have no test with Symfony 1.1

sfPropelManualOrderPlugin http://trac.symfony-project.com/wiki/sfPropelManualOrderPlugin

pear Mail_Mime & pear Mail http://pear.php.net/package/Mail_Mime http://pear.php.net/package/Mail

edit_area Js Highlighting Html Source http://www.cdolivet.net/editarea/

SimpleJs? Install in js/pack dir http://simplejs.bleebot.com/

Installation

Install plugin

  symfony plugin-install http://plugins.symfony-project.com/spyFormBuilderInterfacePlugin

Create SQL

CREATE TABLE IF NOT EXISTS `spyFormBuilder` (
  `form_id` int(11) NOT NULL auto_increment,
  `form_name` varchar(255) collate utf8_unicode_ci NOT NULL,
  `form_template` longblob NOT NULL,
  PRIMARY KEY  (`form_id`),
  UNIQUE KEY `spyFormBuilder_name` (`form_name`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `spyFormBuilderFields`
--

CREATE TABLE IF NOT EXISTS `spyFormBuilderFields` (
  `field_id` int(33) NOT NULL auto_increment,
  `field_type` int(11) NOT NULL,
  `field_name` varchar(255) collate utf8_unicode_ci NOT NULL,
  `field_label` varchar(255) collate utf8_unicode_ci default NULL,
  `field_params` longblob,
  `form_id` int(11) NOT NULL,
  PRIMARY KEY  (`field_id`),
  UNIQUE KEY `field_name` (`field_name`),
  KEY `field_type` (`field_type`),
  KEY `spyFormBuilderFields_FI_2` (`form_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `spyFormBuilderFieldValidations`
--

CREATE TABLE IF NOT EXISTS `spyFormBuilderFieldValidations` (
  `fldvalidation_id` int(33) NOT NULL auto_increment,
  `fldvalidation_type` int(11) NOT NULL,
  `fldvalidation_field` int(33) NOT NULL,
  `fldvalidation_params` longblob,
  `error_msg` varchar(500) collate utf8_unicode_ci default NULL,
  PRIMARY KEY  (`fldvalidation_id`),
  KEY `spyFormBuilderFieldValidations_FI_1` (`fldvalidation_type`),
  KEY `spyFormBuilderFieldValidations_FI_2` (`fldvalidation_field`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `spyFormBuilderStored`
--

CREATE TABLE IF NOT EXISTS `spyFormBuilderStored` (
  `stored_id` int(33) NOT NULL auto_increment,
  `stored_form_id` int(11) NOT NULL,
  `stored_ip` varchar(25) collate utf8_unicode_ci default NULL,
  `stored_data` longblob,
  `created_at` date default NULL,
  PRIMARY KEY  (`stored_id`),
  KEY `spyFormBuilderStored_FI_1` (`stored_form_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `spyFormBuilderTypes`
--

CREATE TABLE IF NOT EXISTS `spyFormBuilderTypes` (
  `type_id` int(11) NOT NULL auto_increment,
  `type_name` varchar(255) collate utf8_unicode_ci NOT NULL,
  PRIMARY KEY  (`type_id`),
  UNIQUE KEY `type_name` (`type_name`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `spyFormBuilderValidators`
--

CREATE TABLE IF NOT EXISTS `spyFormBuilderValidators` (
  `validator_id` int(11) NOT NULL auto_increment,
  `validator_name` varchar(255) collate utf8_unicode_ci NOT NULL,
  `validator_class` varchar(255) collate utf8_unicode_ci default NULL,
  `validators_params` longblob,
  PRIMARY KEY  (`validator_id`),
  UNIQUE KEY `validator_name` (`validator_name`),
  KEY `validator_class` (`validator_class`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

symfony propel-load-data MY_APP plugins/spyFormBuilderInterfacePlugin/data/fixtures

symfony cc

Configuration

-Setting up admin panel.

In your backend to your settings.yml

all:
  .settings:
    enabled_modules:        [default, spyFormBuilderInterface , spyFormBuilderInterfaceFields, spyFormBuilderInterfaceTemplate , spyFormBuilderInterfaceValidate ]

- In the front end

all:
  .settings:
    enabled_modules:        [default, spyFormBuilderFront ]

To Do

Corrections of required for file field

Correction to set All in English and use more i18n

Optimisations of the Databases Request

Export to CSV and XLS for the save_to_database field Pagination of results into save_to_database field Search Sytem into save_to_database field

Adding a component to display form in an other page

Suggestions

Send Me your suggestion at [cedric.lombardot AT spyrit DOT net]

License

LGPL

CHANGELOG

2006 - 06 - 11 : version 1.0.1213188187

  • Restructuration of the validators_class and fields_class into subfolders
  • Adding date field cpoying input_date_tag of symfony 1.0
  • Adding managable jsMessage on app.yml
    jsValidator:
          fr:#culture
            start_message: "Le formulaire contient des erreurs :" #Message for start Js Alert
            end_message: "Merci de corriger"
    
  • Adding Price calculator field
  • Correction of view.yml in spyFormBuilderIntefaceFields
  • Correction of bug in redirection
  • Adding %%field_name%% in the redirect field

2006 - 06 - 10 First version on trac.symfony-project.com

Author

C├ędric Lombardot http://cv.luckylife.fr - SPYRIT http://spyrit.net

Attachments