
let fields = [];
function vacfAddField(type){
    let label = prompt("Field Label:");
    if(!label) return;
    let name = label.toLowerCase().replace(/\s+/g,'_');
    fields.push({type:type,label:label,name:name});
    document.getElementById('vacf-fields-output').value = JSON.stringify(fields);
    alert("Field added: "+label);
}
