PHPackages                             eltharin/reloadablefield - 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. eltharin/reloadablefield

ActiveSymfony-bundle

eltharin/reloadablefield
========================

reloadablefield Bundle for symfony

V2.0.2(1y ago)160GPL-3.0PHP

Since Aug 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/eltharin/reloadablefields)[ Packagist](https://packagist.org/packages/eltharin/reloadablefield)[ RSS](/packages/eltharin-reloadablefield/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (13)Used By (0)

Symfony ReloadableFields Bundle
===============================

[](#symfony-reloadablefields-bundle)

[![Latest Stable Version](https://camo.githubusercontent.com/2affd426205cd908c4a6b44bf327593f1d5184695c7d54c2ec8eea3e17d11e87/687474703a2f2f706f7365722e707567782e6f72672f656c74686172696e2f72656c6f616461626c656669656c642f76)](https://packagist.org/packages/eltharin/reloadablefield)[![Total Downloads](https://camo.githubusercontent.com/a744483754ac01620263f0ddd46d33b3b11e92d739a3a01b0bc02e07cb8ae2c3/687474703a2f2f706f7365722e707567782e6f72672f656c74686172696e2f72656c6f616461626c656669656c642f646f776e6c6f616473)](https://packagist.org/packages/eltharin/reloadablefield)[![Latest Unstable Version](https://camo.githubusercontent.com/e5191d101f4c8605ef6ed8926c574e1f1ebcaa644c9c43c012352598850b8186/687474703a2f2f706f7365722e707567782e6f72672f656c74686172696e2f72656c6f616461626c656669656c642f762f756e737461626c65)](https://packagist.org/packages/eltharin/reloadablefield)[![License](https://camo.githubusercontent.com/c1e5da0746a51e1a4950bfcf3f3776210ae83979a5f759923a3328e46faa2d85/687474703a2f2f706f7365722e707567782e6f72672f656c74686172696e2f72656c6f616461626c656669656c642f6c6963656e7365)](https://packagist.org/packages/eltharin/reloadablefield)

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

[](#installation)

- Require the bundle with composer:

```
composer require eltharin/reloadablefield
```

What is ReloadableFields Bundle?
--------------------------------

[](#what-is-reloadablefields-bundle)

This bundle will help you to work with reloadbale fields, it will make the ajax query and the backend for reload a form select.

The select will have a new event "reload" witch call an ajax query.

When you modify in other page the data linked to the field you can easiest reload them.

This library use junior.js, my small library for manage events, http request and other.

you can download it like this :

You nedd to have the JuniorJs suite for use this bundle :

```
composer require eltharin/juniorjs
```

Or you can use your own script by settings this configuration :

```
# config/packages/eltharin_reloadable_field.yaml

eltharin_reloadable_field:
  useOwnJsFile: true
```

if you want to use default JS for ajax query, leave useOwnJsFile parameters at false and import eltharin/twigfilesgetter for load unique Js :

by default, it adds a markup in params/after, you need to update your form theme to view it by add :

```
# form theme twig template

{%- block form_row -%}

...

{%- for after in params.after -%}
    {{ block(after[0]) }}
{%- endfor -%}

...

{%- endblock form_row -%}
```

ReloadButton HTML
-----------------

[](#reloadbutton-html)

By default, the HTML of the ReloadButton use fontAwesome :

```
''
```

For change the ReloadButton HTML for all of your site, you can create a form template with a block named reloadablefield\_reload\_button :

```
{%- block reloadablefield_reload_button -%}

{%- endblock reloadablefield_reload_button -%}
```

or for change only once, in Type Class :

```
'reloadbtn' => 'reload',
```

Don't forget to add reload\_button class for use default js.

Bonus
-----

[](#bonus)

How add a "add" button for launch a form popup and reload automaticly the select :

1- in Type Class : add params :

```
'params' => ['after' => ['']]
```

2- with my other JS bundle :  you can have the openpopup class, form will be called in ajax and print in a popup

3- by default automaticly, it add an event "onFormSubmitSuccess" executed after form submit per example:

```
JR.events.add('onFormSubmitSuccess','.addAndReload',  function(event)
{
    var textToSearch = "";
    if(this.dataset.formfield !== undefined)
    {
        textToSearch = event.detail.formData.get(this.dataset.formfield) || "";
    }

    JR.events.dispatch('reload', '#' + this.dataset.target, {
        "detail": {
            onReload : function (select,httprequest) {
                if(textToSearch != "")
                {
                    const optionToSelect = Array.from(select.options).find(item => item.text === textToSearch);
                    optionToSelect.selected = true;
                }
            }
        }
    });
});
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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 ~66 days

Total

12

Last Release

637d ago

Major Versions

V1.5.1 → V2.0.02024-03-11

### Community

Maintainers

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

---

Top Contributors

[![eltharin](https://avatars.githubusercontent.com/u/7547802?v=4)](https://github.com/eltharin "eltharin (14 commits)")

---

Tags

symfonybundlewebcssJS

### Embed Badge

![Health badge](/badges/eltharin-reloadablefield/health.svg)

```
[![Health](https://phpackages.com/badges/eltharin-reloadablefield/health.svg)](https://phpackages.com/packages/eltharin-reloadablefield)
```

###  Alternatives

[twitter/bootstrap

The most popular front-end framework for developing responsive, mobile first projects on the web.

174.1k1.7M27](/packages/twitter-bootstrap)[onokumus/metismenu

A jQuery menu plugin

2.0k263.3k5](/packages/onokumus-metismenu)[robertotru/to-inline-style-email-bundle

A Symfony2 bundle for using the CssToInlineStyles translator by tijsverkoyen

59384.3k](/packages/robertotru-to-inline-style-email-bundle)[sensiolabs/minify-bundle

Assets Minifier (CSS, JS) for Symfony &amp; Minify integration in Asset Mapper

5694.9k1](/packages/sensiolabs-minify-bundle)[onokumus/metismenujs

A menu plugin

13210.2k](/packages/onokumus-metismenujs)[spomky-labs/web-push

Web-Push framework for PHP

281.8k](/packages/spomky-labs-web-push)

PHPackages © 2026

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