Answer the question
In order to leave comments, you need to log in
How to generate a form (without a model, i.e. we don’t have a class) using attributes from the database?
I have tables (which are created by user-specified attributes) and I need to make a form to add an entry to this table, how can I implement this?
Answer the question
In order to leave comments, you need to log in
What is your difficulty? Do not know how to create a form or do not know how to write to the database??
In addition to the tables themselves, you need to create in a separate table a record about which table does what and what it is, for all this a parser / factory for creating a dynamic model is written, which you pass to the view, and there is something like
foreach($model->attributes as $attr) {
.... // Ваши поля формы
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question