PHPackages                             victormacko/symfony-standalone-forms - 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. [Framework](/categories/framework)
4. /
5. victormacko/symfony-standalone-forms

ActiveLibrary[Framework](/categories/framework)

victormacko/symfony-standalone-forms
====================================

12.4kPHP

Since Oct 18Pushed 8y ago2 watchersCompare

[ Source](https://github.com/victormacko/symfony-standalone-forms)[ Packagist](https://packagist.org/packages/victormacko/symfony-standalone-forms)[ RSS](/packages/victormacko-symfony-standalone-forms/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Symfony standalone forms
========================

[](#symfony-standalone-forms)

Implementation of Symfony2 forms component with different templating engines

The 'views/Form' directory contains a bootstrap implementation (horizontal) of the symfony2 bootstrap created in Twig ([https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap\_3\_layout.html.twig](https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig) &amp; [https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap\_3\_horizontal\_layout.html.twig](https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_horizontal_layout.html.twig))

The 'ControllerSymfonyFormTrait.php' file contains a trait to include in your base controller, which adds the 'createForm' and 'createFormBuilder' functions, as detailed here;

Smarty
------

[](#smarty)

web/index.php contains a 'demo' controller to pull together the various components, create a Smarty instance and then output it.

Volt
----

[](#volt)

Volt support is included

In the register-engine block (in services.php), include the following line;

```
$view->registerEngines(array(
	'.volt' => function ($view, $di) use ($config) {

		$volt = new VoltEngine($view, $di);

		$volt->setOptions(array(
			'compiledPath' => $config->application->cacheDir,
			'compiledSeparator' => '_',
			'compileAlways' => true
		));

		$compiler = $volt->getCompiler();
		SymfonyFormHelper::registerFormPluginsWithVolt($compiler);

		return $volt;
	},
	'.phtml' => 'Phalcon\Mvc\View\Engine\Php'
));
```

Within your controller, to create the form, you just need to include the following;

```
$form = $this
	->createFormBuilder()
	->add('testField', \SymfonyStandaloneForms\Type\TextType::class, [
		'constraints' => [
			new \Symfony\Component\Validator\Constraints\Length(['min' => 2])
		]
	])
	->add('submit', \Symfony\Component\Form\Extension\Core\Type\SubmitType::class)
	->getForm();

$form->handleRequest(\Symfony\Component\HttpFoundation\Request::createFromGlobals());
if($form->isSubmitted()) {
	if($form->isValid()) {
		// get data from field;
		$data = $form->get('testField')->getData();
	}
}

$this->view->form2 = $form->createView();
```

Your volt code will then need to include the standard template code to render forms - eg;

```
{{ form_start(form, {'attr': {'novalidate': 'novalidate'} }) }}
{{ form_row(form['testField']) }}
{{ form_rest(form) }}
{{ form_end(form) }}

```

Plain PHP
---------

[](#plain-php)

There's also a plain php form rendering option also if smarty isn't your thing.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

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://www.gravatar.com/avatar/ed77db1e47692527cb91dfa02897b3c11d35a7381a5028929bd26776b181b3e3?d=identicon)[victormacko](/maintainers/victormacko)

---

Top Contributors

[![victormacko](https://avatars.githubusercontent.com/u/495820?v=4)](https://github.com/victormacko "victormacko (53 commits)")

### Embed Badge

![Health badge](/badges/victormacko-symfony-standalone-forms/health.svg)

```
[![Health](https://phpackages.com/badges/victormacko-symfony-standalone-forms/health.svg)](https://phpackages.com/packages/victormacko-symfony-standalone-forms)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k104.3M836](/packages/laravel-socialite)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k38.6M289](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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