1 回答
TA贡献1865条经验 获得超7个赞
function formiobuilder(){
$(document).ready(function (){
var formBuilderInstances = [];
$('.section-inner').on('show.bs.collapse', function (e) {
var sectionId = $(this).data('section-id');
var fb = $.grep(formBuilderInstances, function (form) {
return form.id == sectionId;
});
if (!fb[0]) {
var data = forms[sectionId];
//HTML
var formBuilderInstance = Formio.builder(document.getElementById('fb-editor-' + sectionId, JSON.stringify(data) ))
formBuilderInstances.push({id: sectionId, instance: formBuilderInstance});
}
});
})
}
window.onload = formiobuilder();
添加回答
举报