wbraganca / yii2-dynamicform

It is widget to yii2 framework to clone form elements in a nested manner, maintaining accessibility.
Other
436 stars 438 forks source link

Problem with validation on using Pjax #281

Open svlsvg opened 5 years ago

svlsvg commented 5 years ago

Hello! I'm using Pjax on the project. Dynamic form loaded in popup window with Pjax, then if click to button "Add" numbers of fields (in "id " parameter) are starting from 2, not from 0. And then i have validation error with fields with number 1. Without using Pjax dynamic form working perfect.

So, I think problem in JS in the cloning function. Can you help me solve this problem?

Screens before clicking button "Add": 1 after clicking button "Add": 2