PHPackages                             sazanof/dynamic-panels - 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. sazanof/dynamic-panels

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sazanof/dynamic-panels
======================

Pure JavaScript addon for dynamically adding and removing html blocks with form elements and preparing for the subsequent sending of structured data to the server

1.0(6y ago)09MITJavaScript

Since Nov 15Pushed 6y ago1 watchersCompare

[ Source](https://github.com/sazanof/dynamic-panels)[ Packagist](https://packagist.org/packages/sazanof/dynamic-panels)[ RSS](/packages/sazanof-dynamic-panels/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Dynamic Panels
==============

[](#dynamic-panels)

Pure JavaScript addon for dynamically adding and removing html blocks with form elements and preparing for the subsequent sending of structured data to the server

Дополнение на чистом JavaScript для возможности добавления динамических элементов форм на странице. Без зависимостей.

Installation / Установка
========================

[](#installation--установка)

`composer require sazanof/dynamic-panels`

Or you can just download the repo using Git

Initialization / Инициализация
==============================

[](#initialization--инициализация)

```

```

Usage / Использование
=====================

[](#usage--использование)

```

    window.addEventListener('DOMContentLoaded',function () {
        var ex1 = new DynamicPanels({
            id:'example1',
            name_key:'details'
        }).init();
        var ex2 = new DynamicPanels({
            id: 'example2',
            name_key: 'dd',
            classes: {
                inner :'.custom_dp_class',
                header : '.custom_dp_class-header',
                title : '.custom_dp_class-title',
                actions : '.custom_dp_class-actions'
            }
        }).init();
    })

```

Dependences
===========

[](#dependences)

No dependences

Polyfills
=========

[](#polyfills)

Some Browsers like IE did not understand such methods like **forEach** or **closest** and **match**. If you want to use it, just include the **pollyfills.js** in you project, or use **dynamic-panels-w-polyfill.js**

Некоторые браузеры (например Internet Explorer) не понимают **forEach**, **closest**, **match**. Можете использовать **pollyfills.js** в проекте или же просто подключить **dynamic-panels-w-polyfill.js**

HTML structure / Структура HTML кода
====================================

[](#html-structure--структура-html-кода)

Required html attributes in child element block. Обязательные атрибуты элементов:

```
