E
E
EVOSandru62015-01-19 10:50:31
Yii
EVOSandru6, 2015-01-19 10:50:31

How to make dynamically added fields in a form in yii?

Good afternoon,
I have 3 tables:
==========
t_product
==========
CODE
NAME
==========
======== ==
mc_faq
==========
CODE
NAME
DESCRIPTION
==========
==========
l_product_22_faq
==========
CODE_1
CODE_2
= =========

I need it so that when I fill in the product data in the admin panel, I was prompted to Fill in the question and answer, i.e. 2 fields - text and textarea . If you still need to add a question / answer, press the plus sign and another text and textarea appears. Then everything is simple. afterSave happensand there, first in the loop , Faqs are thrown, and then connections are thrown, I'm wondering if there is a solution for dynamic fields in YII , or will JQUERY have to call for help anyway?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2015-01-22
@EVOSandru6

Yii is a server-side php framework. It has no dynamics.
I sent a request to the server, the server thought and gave the page. And... turned off. Boring...
You need Ajax. I called on AngularJS to help. Just right for your task.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question