When generating dynamic forms from a json file, the forms end up being displayed one on top of the other like this:
https://i.sstatic.net/tbdzs.png
However, I want them to be displayed like this (for example, if there are 3 inputs, the fourth one should be next to the third one and so on):
https://i.sstatic.net/H2v0R.png
<div v-for="(item, index) in json" :key="index">
<b-form-input v-if="item.type" :type="item.type"></b-form-input>
</div>
The object structure is as follows:
[
{
"key": "key1",
"label": "Input Type Text",
"type": "text",
"value": ""
},
{
"key": "key2",
"label": "Input Type Number",
"type": "number",
"value": ""
},
{
"key": "key3",
"label": "Input Type Number",
"type": "number",
"value": ""
}
]
I attempted to use class="row"
to solve the issue, but it didn't work as expected since the forms still stack on top of each other.