feat: HEADING field type for registration forms — replace section property with structural field

Replace the per-field `section` text property with a dedicated HEADING field type that
organizers add as a separate block for visual grouping. Also fixes duplicate heading bug
on portal radio fields, replaces cramped VBtnToggle with VSelect for field width, and
adds grouped field type dropdown with structure/input categories.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-16 16:40:41 +02:00
parent 9718e27029
commit d57dcdb616
27 changed files with 667 additions and 480 deletions

View File

@@ -32,7 +32,6 @@ final class RegistrationFormFieldFactory extends Factory
'is_portal_visible' => true,
'is_admin_only' => false,
'is_filterable' => false,
'section' => null,
'help_text' => null,
'sort_order' => fake()->numberBetween(0, 20),
'display_width' => FieldDisplayWidth::FULL,
@@ -45,7 +44,6 @@ final class RegistrationFormFieldFactory extends Factory
'label' => 'Noodcontact naam',
'slug' => 'noodcontact-naam',
'field_type' => RegistrationFieldType::TEXT,
'section' => 'Noodcontact',
'display_width' => FieldDisplayWidth::HALF,
]);
}
@@ -81,7 +79,6 @@ final class RegistrationFormFieldFactory extends Factory
'slug' => 'toestemming-gegevensverwerking',
'field_type' => RegistrationFieldType::BOOLEAN,
'is_required' => true,
'section' => 'Toestemming',
'help_text' => 'Ik geef toestemming voor de verwerking van mijn persoonsgegevens conform de AVG.',
'display_width' => FieldDisplayWidth::FULL,
]);
@@ -109,7 +106,6 @@ final class RegistrationFormFieldFactory extends Factory
['label' => 'Entreeticket', 'description' => 'Je ontvangt een gratis festivalticket als dank voor je inzet'],
['label' => 'Vrijwilligersvergoeding', 'description' => 'Je ontvangt een vergoeding conform de vrijwilligersregeling'],
],
'section' => 'Vergoeding',
'display_width' => FieldDisplayWidth::FULL,
]);
}
@@ -123,4 +119,15 @@ final class RegistrationFormFieldFactory extends Factory
'display_width' => FieldDisplayWidth::FULL,
]);
}
public function headingField(): static
{
return $this->state(fn () => [
'label' => 'Persoonlijke voorkeuren',
'slug' => 'persoonlijke-voorkeuren',
'field_type' => RegistrationFieldType::HEADING,
'help_text' => 'Vertel ons wat we over jou moeten weten',
'display_width' => FieldDisplayWidth::FULL,
]);
}
}