function buildFields (data) {
	for (var i = 0; i < data.length; i++) {
		fields.push(new Fieldset(data[i]));
		if (data[i].children) {
			fields[i].children = [];
			for (var j = 0;j < data[i].children.length; j++) {
				var current = data[i].children[j];
				if (current.type === "select") {
					fields[i].children.push(new SelectItem(current));
				} else if (current.type === "range") {
					fields[i].children.push(new RangeItem(current));
				} else if (current.type === "checkbox") {
					fields[i].children.push(new CheckboxItem(current));
				} else if (current.type === "radio") {
					fields[i].children.push(new RadioItem(current));
				}
			}
		}
	}
	fields = fields;
	renderItems(fields);
	buildInitialCSS(fields);
}
/**
 * De functie om alle velden in een object te zetten
 * Hier worden de constructors aangeroepen 
 * om vervolgens HTML ervan te maken in function renderItems
 */
De functie om alle velden in een object te zetten
Hier worden de constructors aangeroepen
om vervolgens HTML ervan te maken in function renderItems
De functie om alle velden in een object te zetten Hier worden de constructors aangeroepen om vervolgens HTML ervan te maken in function renderItems
function buildFields (data) {
	for (var i = 0; i < data.length; i++) {
		fields.push(new Fieldset(data[i]));
		if (data[i].children) {
			fields[i].children = [];
			for (var j = 0;j < data[i].children.length; j++) {
				var current = data[i].children[j];
				if (current.type === "select") {
					fields[i].children.push(new SelectItem(current));
				} else if (current.type === "range") {
					fields[i].children.push(new RangeItem(current));
				} else if (current.type === "checkbox") {
					fields[i].children.push(new CheckboxItem(current));
				} else if (current.type === "radio") {
					fields[i].children.push(new RadioItem(current));
				}
			}
		}
	}
	fields = fields;
	renderItems(fields);
	buildInitialCSS(fields);
}
function buildFields ( data ) { for ( var i = 0 ; i < data . length ; i ++ ) { fields . push ( new Fieldset ( data [ i ] ) ) ; if ( data [ i ] . children ) { fields [ i ] . children = [ ] ; for ( var j = 0 ; j < data [ i ] . children . length ; j ++ ) { var current = data [ i ] . children [ j ] ; if ( current . type === "select" ) { fields [ i ] . children . push ( new SelectItem ( current ) ) ; } else if ( current . type === "range" ) { fields [ i ] . children . push ( new RangeItem ( current ) ) ; } else if ( current . type === "checkbox" ) { fields [ i ] . children . push ( new CheckboxItem ( current ) ) ; } else if ( current . type === "radio" ) { fields [ i ] . children . push ( new RadioItem ( current ) ) ; } } } } fields = fields ; renderItems ( fields ) ; buildInitialCSS ( fields ) ; }
De functie om alle velden in een object te zetten
 Hier worden de constructors aangeroepen
 om vervolgens HTML ervan te maken in function renderItems
De functie om alle velden in een object te zetten Hier worden de constructors aangeroepen om vervolgens HTML ervan te maken in function renderItems