Php 基于用户多级选择的动态表单
我需要根据用户在多个级别上的输入创建表单。Php 基于用户多级选择的动态表单,php,mysql,forms,symfony,Php,Mysql,Forms,Symfony,我需要根据用户在多个级别上的输入创建表单。 让我解释一下: 我有一个带有几个字段的“基本”表单,“客户”(选择)就是其中之一。 当用户选择客户时,它将加载一个子表单。此子表单对于每个客户都不同,并且可以在其下保存某些条件。让我解释一下: CustomerA --> Display customerA subform Input1 Input2 Select1 Yes No [options can be man
让我解释一下: 我有一个带有几个字段的“基本”表单,“客户”(选择)就是其中之一。 当用户选择客户时,它将加载一个子表单。此子表单对于每个客户都不同,并且可以在其下保存某些条件。让我解释一下:
CustomerA
--> Display customerA subform
Input1
Input2
Select1
Yes
No
[options can be managed in database]
Select2
Yes
--> Display customerA.select2.option.yes subform
Input1
Select1
Option1
Option2
Option3
[options can be managed in database]
...
No
CustomerB
Select1
Option1
Option2
[options can be managed in database]
Select2
Yes
No
[options can be managed in database]
Input1
...
我考虑使用一个json对象(条令)来存储它。但我不知道如何处理表单字段(父id?)的存储和条件的计算
我对这些东西有点迷茫
感谢您的帮助如果您正在使用Symfony,那么您应该阅读Symfony的文档部分