H
H
Hermes2022-03-09 21:56:44
Yii
Hermes, 2022-03-09 21:56:44

What are the solutions for creating fields dynamically in Yii2?

You need to be able to add new fields to the form. Visually, the following result is expected:
kiss_9kb.1646851919.png

Now I use wbraganca/yii2-dynamicform , but more and more nuances emerge with each step. For example: the fields in the middle are updated incorrectly, Model::createMultiple is designed for an ActiveRecord with an id field, and I use forms.

In a similar question I found: unclead/yii2-multiple-input , but I need to duplicate two fields at once: "Property", "Value".

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2022-03-31
@tomclancys

Through unclead / yii2-multiple-input, you can add two or three fields and add as many as you like. Read the docs. They are not really detailed, but I figured it out in a couple of evenings.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question