PHPackages                             desarrollo-cespi/dc-reloaded-form-extra-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. desarrollo-cespi/dc-reloaded-form-extra-plugin

ActiveSymfony1-plugin[Utility &amp; Helpers](/categories/utility)

desarrollo-cespi/dc-reloaded-form-extra-plugin
==============================================

A set of useful extra widgets, validators, modules and other handy stuff for your symfony 1 projects

08JavaScript

Since Dec 27Pushed 12y ago7 watchersCompare

[ Source](https://github.com/Desarrollo-CeSPI/dcReloadedFormExtraPlugin)[ Packagist](https://packagist.org/packages/desarrollo-cespi/dc-reloaded-form-extra-plugin)[ RSS](/packages/desarrollo-cespi-dc-reloaded-form-extra-plugin/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

dcReloadedFormExtraPlugin
=========================

[](#dcreloadedformextraplugin)

The `dcReloadedFormExtraPlugin` adds some useful extra widgets, validators, modules, etc.

Installation
------------

[](#installation)

- Via composer:

```
{
  "require": {
    "desarrollo-cespi/dc-reloaded-form-extra-plugin": "dev-master"
  }
}
```

- Or using git, from source.
- Enable the plugin in your proyect configuration

```
// in config/ProjectConfiguration.class.php add:
$this->enablePlugin("dcReloadedFormExtraPlugin");
```

- Clear the cache

Widgets
-------

[](#widgets)

### pmWidgetFormPropelChoiceOrCreate

[](#pmwidgetformpropelchoiceorcreate)

The `pmWidgetFormPropelChoiceOrCreate` extends the functionality provided by the `sfWidgetFormPropelChoice`, adding a link that opens a new window, allowing the user to create an object of the widget's model. Then, that object is available for being selected.

##### Usage

[](#usage)

Use it as you use the `sfWidgetFormPropelChoice`, except for the following new parameters:

- **url**
- **new\_label**: The link's label. Defaults to *New*
- **ws\_url**

Enable the `dc_ajax` module.

**Note**: [jQuery](http://jquery.com) is required.

### pmWidgetFormDoctrineChoiceOrCreate

[](#pmwidgetformdoctrinechoiceorcreate)

The `pmWidgetFormDoctrineChoiceOrCreate` is the doctrine version of the `pmWidgetFormPropelChoiceOrCreate`. So, use it as you use the `pmWidgetFormPropelChoiceOrCreate`.

### mtWidgetFormPlain

[](#mtwidgetformplain)

The `mtWidgetFormPlain` provides a way for showing plain values in the forms.

##### Usage

[](#usage-1)

```
$this->widgetSchema["some_field"] = new mtWidgetFormPlain(array("add_hidden_input" => true));
```

For more options, take a look at the widget's doc comments.

### dcWidgetFormAjaxDependence

[](#dcwidgetformajaxdependence)

This widget is used with select widgets filtering values depending on the selection made in observed widget. Supose widget A11 observing A1 widget changes, that observes A widget changes. In this case, you can have the following scenarios:

- The form will save A, A1 and A11 values
- The form will only sava A11 values (A and A1 will be used only for filtering purpose)

For the first case, just use the widget as it is. But for the second case, you will need to do some trick inside the form implementation:

```
if (!$this->getObject()->isNew())
{
  $a11Object=$this->getObject()->getA11();
  $this->setDefault('a1_id',$a11Object->getA1Id());
  $this->setDefault('a_id',$b111->getB11()->getA1()->getAId());
}
```

##### Usage

[](#usage-2)

```
$w = new sfWidgetFormInput();
$this->widgetSchema["some_field"] = new dcWidgetFormAjaxDependence(array(
  "dependant_widget" => $w,
  "observe_widget_id" => "some_form_some_field",
  "get_observed_value_callback" => array(get_class($this), "getValueForUpdate")
));
```

And then you must implement the getValueForUpdate method.

### dcWidgetFormPropelAjaxDependence

[](#dcwidgetformpropelajaxdependence)

Same as dcWidgetFormAjaxDependence, except that retrieves objects from Propel classes.

### dcWidgetFormJQueryActivator

[](#dcwidgetformjqueryactivator)

Based on dcWidgetFormJQueryDependence. It enables or disables the widget when another changes and a given condition evaluates to true.

### mtWidgetFormPlain

[](#mtwidgetformplain-1)

The `mtWidgetFormPlain` displays a plain value.

##### Usage

[](#usage-3)

```
$this->setWidget("some_field", new mtWidgetFormPlain());
```

### dcWidgetFormChangeForCredentials

[](#dcwidgetformchangeforcredentials)

The `dcWidgetFormChangeForCredentials` displays one of two widgets depending on user's credentials.

##### Usage

[](#usage-4)

```
$this->setWidget("some_field", new dcWidgetFormChangeForCredentials(new array(
  "credentials" => array(array("admin", "some_credential")),
  "widget_without_credentials" => new mtWidgetFormPlain(),
  "widget_with_credentials" => new sfWidgetFormInput()
)));
```

### mtWidgetFormPartial

[](#mtwidgetformpartial)

The `mtWidgetFormPartial` displays a partial.

##### Usage

[](#usage-5)

```
$this->setWidget("partial", new mtWidgetFormPartial(array(
  "module" => "some_module",
  "partial" => "some_partial",
  "form" => $this
));
```

### pmWidgetFormSelectJQueryAutocomplete

[](#pmwidgetformselectjqueryautocomplete)

The `pmWidgetFormSelectJQueryAutocomplete` displays an autocomplete based on a select tag. This widget is basically a renderer, so it can be used as the renderer of a sfWidgetFormChoice, sfWidgetFormPropelChoice, etc.

jquery ui is required.

##### Usage

[](#usage-6)

```
$this->getWidget("city_id")->setOption("renderer_class", "pmWidgetFormSelectJQueryAutocomplete");
```

### pmWidgetFormJQuerySearch

[](#pmwidgetformjquerysearch)

The `pmWidgetFormJQuerySearch` displays an input text with search capabilities.

##### Usage

[](#usage-7)

```
$this->setWidget("some_field") = new pmWidgetFormJQuerySearch(array(
  "url" => "@url_that_performs_the_search"
));
```

The jquery\_search.js provides a javascript class with functions for displaying the results. See the example of a pmWidgetFormPropelJQuerySearch.

### pmWidgetFormPropelJQuerySearch

[](#pmwidgetformpropeljquerysearch)

The `pmWidgetFormJQuerySearch` displays an input text with search capabilities over propel objects.

##### Usage

[](#usage-8)

```
$this->setWidget("some_field_id", new pmWidgetFormPropelJQuerySearch(array(
  "model" => "SomeField",
  "column" => "some_column"
)));
```

### mtWidgetFormInputDate

[](#mtwidgetforminputdate)

The `mtWidgetFormInputDate` displays an input text for selecting dates. Must be validated with mtValidatorDateString and jquery and jqueryui are REQUIRED.

##### Usage

[](#usage-9)

```
$this->setWidget("date", new mtWidgetFormInputDate());
```

### mtWidgetFormEmbed

[](#mtwidgetformembed)

Widgets that embeds a dinamic number of forms. This widget only does the 'view' part. The saving and deleting of new and previous object has to be done manually.

### mtWidgetFormCuil

[](#mtwidgetformcuil)

Represents an Argetine CUIL/CUIT

### alWdigetFormTimepicker

[](#alwdigetformtimepicker)

Represents an Hour or also an Hour range.

This widget is a wrapper for a jQueryUITimepicker ().

##### Usage

[](#usage-10)

The javascript widget can be configured in many ways, so you could define an associative array of key -&gt; value (available options defined on author page or on this widget implementantion) to give values to it. Also, it allows to create ingle or range time values.

For a single time value all you need is:

```
$this->setWidget("single_hour", new alWidgetFormTimepicker(array('config' => array('jquery_widget_option_key' => 'jquery_widget_option_value'))));
```

For a range time value:

```
$this->setWidget("range_hour", new alWidgetFormTimepicker(array('config' => array('jquery_widget_option_key' => 'jquery_widget_option_value'), 'enable_timerange' => true)));
```

Note: remember than this widget uses the alValidatorTimepicker validator, and it should be configured wheter the value is single or range.

Check for in the validator section for further explanation on this matters.

Validators
----------

[](#validators)

### mtValidatorDateString

[](#mtvalidatordatestring)

Validates dates represented as strings.

### alValidatorTimepicker

[](#alvalidatortimepicker)

Validates single or range hour as strings.

It accepts an option called enable\_timerange (by default set to false), that when its set to true, will be expecting a string that looks like this: "HH:MM-HH:MM". Otherwise, it will validate a single value like "HH:MM".

Range value

```
$this->setValidator("range_hour", new alValidatorTimepicker(array('enable_timerange' => true)));
```

Single value

```
$this->setValidator("single_hour", new alValidatorTimepicker(array('enable_timerange' => false)));
```

or

```
$this->setValidator("single_hour", new alValidatorTimepicker());
```

### mtValidatorCuil

[](#mtvalidatorcuil)

Validates a CUIL/CUIT from a String

### mtValidatorCuilExtended

[](#mtvalidatorcuilextended)

Validates a CUIL/CUIT from a string made by mtWidgetFormCuil

##### Usage

[](#usage-11)

```
$this->setValidator("date", new mtValidatorDateString());
```

Form auto-initialization
------------------------

[](#form-auto-initialization)

This plugin provides form classes (which extends sfFormPropel and sfFormFilterPropel) that auto-initializes forms.

You just have to change the super class of the BaseFormPropel (and BaseFormFilterPropel) in order to use this functionality.

```
abstract class BaseFormPropel extends pmFormPropel
{
}
```

and

```
abstract class BaseFormPropel extends pmFormFilterPropel
{
}
```

These clases uses the plugin's widgets and validators to initialize widgets and validators automatically:

- unsets created\_at and updated\_at fields
- uses mtWidgetFormInputDate for date widgets
- replaces fields named "attachment" with sfWidgetFormInputFile
- hides created\_by and updated\_by fields
- uses mtValidatorDateString for date validators
- uses sfValidatorFile for fields named "attachment"

For developers
--------------

[](#for-developers)

- If you need to create ajax actions use the `dc_ajax` module.

TODO
----

[](#todo)

### pmWidgetFormPropelChoiceOrCreate

[](#pmwidgetformpropelchoiceorcreate-1)

- Add more of the sfWidgetFormPropelChoice parameters to the getPropelChoices action (and getDoctrineChoices).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/95592?v=4)[Nahuel Cuesta Luengo](/maintainers/ncuesta)[@ncuesta](https://github.com/ncuesta)

---

Top Contributors

[![ncuesta](https://avatars.githubusercontent.com/u/95592?v=4)](https://github.com/ncuesta "ncuesta (3 commits)")

### Embed Badge

![Health badge](/badges/desarrollo-cespi-dc-reloaded-form-extra-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/desarrollo-cespi-dc-reloaded-form-extra-plugin/health.svg)](https://phpackages.com/packages/desarrollo-cespi-dc-reloaded-form-extra-plugin)
```

###  Alternatives

[fieg/bayes

Implementation of Naive Bayes Classifier algorithm in PHP.

7394.1k](/packages/fieg-bayes)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
