feat: registration form field display_width and option descriptions
Add configurable column widths (full/half) and optional descriptions for radio/select/checkbox options on registration form fields. - Migration adds display_width column to both tables - FieldDisplayWidth enum with smart defaults per field type - normalized_options accessor for backwards-compatible option format - Portal form renderer uses display_width for VRow/VCol grid layout - Radio/select/checkbox options render with descriptions - Admin field editor supports display_width toggle and description input - System templates updated with appropriate widths and descriptions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Enums\FieldDisplayWidth;
|
||||
use App\Enums\RegistrationFieldType;
|
||||
use App\Models\Organisation;
|
||||
use App\Models\RegistrationFieldTemplate;
|
||||
@@ -34,6 +35,7 @@ final class RegistrationFieldTemplateFactory extends Factory
|
||||
'section' => null,
|
||||
'help_text' => null,
|
||||
'sort_order' => fake()->numberBetween(0, 20),
|
||||
'display_width' => FieldDisplayWidth::FULL,
|
||||
'is_system' => false,
|
||||
'is_active' => true,
|
||||
];
|
||||
@@ -57,6 +59,7 @@ final class RegistrationFieldTemplateFactory extends Factory
|
||||
'field_type' => RegistrationFieldType::SELECT,
|
||||
'options' => ['XS', 'S', 'M', 'L', 'XL', 'XXL', 'XXXL'],
|
||||
'is_filterable' => true,
|
||||
'display_width' => FieldDisplayWidth::HALF,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -67,6 +70,7 @@ final class RegistrationFieldTemplateFactory extends Factory
|
||||
'slug' => 'ehbo-bhv-diploma',
|
||||
'field_type' => RegistrationFieldType::BOOLEAN,
|
||||
'is_filterable' => true,
|
||||
'display_width' => FieldDisplayWidth::HALF,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -77,6 +81,7 @@ final class RegistrationFieldTemplateFactory extends Factory
|
||||
'slug' => 'certificaten-vaardigheden',
|
||||
'field_type' => RegistrationFieldType::TAG_PICKER,
|
||||
'is_filterable' => true,
|
||||
'display_width' => FieldDisplayWidth::FULL,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user