formBuilder
formBuilder copied to clipboard
How would I group an input set?
Is it possible to group an input set of data?
Lets day I have the following:
[
{
"label": "Protein",
"name": "protein",
"showHeader": true,
"fields": [
{
"type": "text",
"label": "Protein title",
"className": "form-control"
},
{
"type": "radio-group",
"name": "radio-group-1506594748152",
"values": [
{
"label": "Yes",
"value": "yes"
},
{
"label": "No",
"value": "no"
}
]
}
]
}
]
If I add drag more than of these input sets onto the canvas then there is no way to tie a field to its group and they all can get muddled up if the user drags them around.
Is it possible for us to simply group each input set?
Any updates on this?
Would be good if we can get some responses at-least, there are some questions that haven't had any response for a month.
Sorry but there is currently no way of doing this and implementing it would be a large undertaking. There is grouping in Formeo but no input sets. I think it would be easier to add input sets to formeo than grouping to formBuilder.
Okay, thanks for letting me know.
This is not the best solution, but this is what I'm doing:
I'm creating header fields as dividers and giving them a class, such as group1start.
Then, the next header's parent will have an empty class attribute. So I'm those that to select my elements and wrap them with jQuery:
jQuery('.group1start').parent().nextUntil('div[class=""]').addBack().wrapAll('<div id="group1"></div>')
$('div[class=""]').each(function(){ var $set = $(this).nextUntil('div[class=""]').addBack(); $set.wrapAll('<fieldset />'); });
Here's what I'm doing to add a fieldset tag using the weird parent div of any heading that's been added.