简体   繁体   中英

What is the best way to add double input field form type in Symfony?

I would like to create double input field form. A feature name and a feature value.

What is the best approach to do it in on product form?

I am using Symfony 2 and MySQL Entity.

I would like to achiev something like this.

在此处输入图片说明

Thanks.

创建一个包含必填字段的 FeatureType,然后使用内置的 CollectionType: http : //symfony.com/doc/current/reference/forms/types/collection.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM