@for (f of config.fields; track f) { @if (f.type === 'text') { {{ f.label }} {{ f.placeholder }} This field is required. } @if (f.type === 'textarea') { {{ f.label }} {{ f.placeholder }} This field is required. } @if (f.type === 'number') { {{ f.label }} Please enter a valid number. } @if (f.type === 'select') { {{ f.label }} @for (opt of f.options; track opt) { {{ opt.label }} } Please select a value. } @if (f.type === 'year') { {{ f.label }} @if (f.yearRange?.allowPresent) { Present } @for (yr of getYearOptions(f); track yr) { {{ yr }} } Please select a year. } @if (f.type === 'date') { {{ f.label }} Please select a date. } @if (f.type === 'file') {
}

{{ f.label }}

@for (item of getArrayControls(f.name); track item; let i = $index) {
@for (sub of f.itemConfig; track sub) { @if (sub.type !== 'hidden') { @if (sub.type === 'date') { {{ sub.label }} } @else if (sub.type === 'year') { {{ sub.label }} @if (sub.yearRange?.allowPresent) { Present } @for (yr of getYearOptions(sub); track yr) { {{ yr }} } } @else { {{ sub.label }} } } }
}
}