PHPackages                             starx/symfony-native-form-builder - 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. [Templating &amp; Views](/categories/templating)
4. /
5. starx/symfony-native-form-builder

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

starx/symfony-native-form-builder
=================================

This bundle allows to generate simple native form using Twig

v0.1.1(10y ago)0321MITPHPPHP &gt;=5.3.1

Since Apr 20Pushed 8mo ago2 watchersCompare

[ Source](https://github.com/starx/SymfonyNativeFormBuilderBundle)[ Packagist](https://packagist.org/packages/starx/symfony-native-form-builder)[ RSS](/packages/starx-symfony-native-form-builder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

Symfony Native Form Builder Bundle
==================================

[](#symfony-native-form-builder-bundle)

This bundle allows you to to create native forms on-the-fly right at your twig file without defining the form in controller/service.

---

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

[](#installation)

Install from composer

```
composer require starx/symfony-native-form-builder

```

#### Enable the bundle

[](#enable-the-bundle)

Enable your bunndle from your `AppKernel.php`

```
public function registerBundles() {
    $bundles = [
        ...,
        new Starx\SymfonyNativeFormBuilderBundle\StarxSymfonyNativeFormBuilderBundle()
    ];

    ...
    return $bundles;
}

```

Usages
------

[](#usages)

In any twig file:

```
{%
    set native_form = native_form_builder.getNativeFormView(
        path('your_route', {
            'id': user.id
        }),
        "GET"
) %}
{{ form_start(native_form) }}

{{ form_end(native_form) }}

```

This will create a native form without any previous declaration in controller/service.

Examples
--------

[](#examples)

1. Quick delete form In any twig file:

    ```
     {%
         set native_delete_form = native_form_builder.getNativeFormView(
             path('your_route_delete_action', {
                 'id': user.id
             }),
             "DELETE"
     ) %}
     {{ form_start(native_delete_form) }}

     {{ form_end(native_delete_form) }}

    ```

This will generate a quick delete form in your twig file with a single button and a CSRF token with `DELETE` http method, which is recommended way to delete a entity.

2. Generating a quick form based on a predefined form type when you want to show list of entities with a small inline form on the side

    ```

             ...

             {% for entity in entities %}
                 {%
                     set native_update_form = native_form_builder.getNativeFormView(
                         path('your_enity_edit_action', {
                             'id': user.id
                         }),
                         "POST",
                         'AppBundle\\Form\\EntityType',
                         entity
                     )
                 %}

                         {{ entity.id }}

                         {{ entity.name }}

                         {{ form_start(native_update_form) }}
                             {{ form_widget(native_update_form.value_field) }}

                         {{ form_end(native_update_form) }}

             {% endfor %}

    ```

This will generate quick update forms in your twig template file where you are showing list of entities showing only one field required to update.

> **Note:**

> I do understand that such use case in twig is discouraged, but other wise to solve such requirement you would have to
>
> - loop through the entities in controller
> - Manually create all the forms for each of those entities
> - Pass them in a view/twig variables to your twig template file and
> - Once again, loop through them again in twig file.
>
> Instead of doing all this, as long as you don't over do it, simple use case as above should be justified.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance43

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

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.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

3669d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d62aa9ddd1758dd002c3b34d8524c0ec0058b89f73544b5ffcdba7ac3ca491e5?d=identicon)[starx](/maintainers/starx)

---

Top Contributors

[![starx](https://avatars.githubusercontent.com/u/1029450?v=4)](https://github.com/starx "starx (10 commits)")

---

Tags

symfonyhelpertwigbuilderform

### Embed Badge

![Health badge](/badges/starx-symfony-native-form-builder/health.svg)

```
[![Health](https://phpackages.com/badges/starx-symfony-native-form-builder/health.svg)](https://phpackages.com/packages/starx-symfony-native-form-builder)
```

###  Alternatives

[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[nucleos/antispam-bundle

This bundle provides some basic features to reduce spam in symfony forms.

52105.1k](/packages/nucleos-antispam-bundle)[jbouzekri/phumbor-bundle

A Symfony Bundle to use the minimal Thumbor PHP client from webfactory/phumbor

25740.0k1](/packages/jbouzekri-phumbor-bundle)[boekkooi/jquery-validation-bundle

Jquery form validation bundle for symfony 2

2773.9k1](/packages/boekkooi-jquery-validation-bundle)[yellowskies/qr-code-bundle

Symfony Barcode &amp; QR Code Generator Bundle with Twig extension

36682.9k](/packages/yellowskies-qr-code-bundle)[symfony/ux-toolkit

A tool to easily create a design system in your Symfony app with customizable, well-crafted Twig components

1432.0k](/packages/symfony-ux-toolkit)

PHPackages © 2026

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