gwenaelp / vfg-field-array

A vue-form-generator field to handle arrays
MIT License
39 stars 24 forks source link

array of arrays #19

Open sanuann opened 3 years ago

sanuann commented 3 years ago

by using this package, is it possible to have two fields on each row in the array? I mean when I click on "add new", it should add two text boxes on the same line(say, "name" and "value"). if this is doable, please let me know how to. Thanks. @gwenaelp any idea how to do this?

gwenaelp commented 3 years ago

mhhhh, there is a way you can do it with css, but you might have to experiment a little bit. One other way would be to make an array of objects, and use my other "vfg-field-object" project. In advance, sorry, i know these projects don't have a perfect documentation... But I think if something is lacking you may be able to understand the source code easily. It's basically one vie component for both projects.

Anyway, what you can try :

After that, you can also convert your object into an array before using it for something else. If you struggle with this method, I can send you a example code (that I used in another project) with a working vfg schema