adds help texts

This commit is contained in:
2026-02-16 16:00:16 +01:00
parent 514f1cb483
commit 78c51d55b5
9 changed files with 95 additions and 46 deletions

View File

@@ -73,25 +73,30 @@ public function fields(NovaRequest $request): array
BelongsTo::make('Category', 'category', CategoryResource::class)
->sortable()
->filterable()
->rules('required'),
->rules('required')
->help('The assessment category this group of questions belongs to, such as Audit or Tax.'),
Text::make('Name')
->sortable()
->filterable()
->copyable()
->rules('required', 'max:255'),
->rules('required', 'max:255')
->help('The title of this question group, shown as a section heading in the questionnaire.'),
Number::make('Sort Order')
->sortable()
->filterable()
->copyable()
->rules('required', 'integer'),
->rules('required', 'integer')
->help('Controls the display order within the category. Lower numbers appear first.'),
Textarea::make('Description')
->rules('nullable'),
->rules('nullable')
->help('An optional description shown to users at the top of this question group.'),
Textarea::make('Scoring Instructions')
->rules('nullable'),
->rules('nullable')
->help('Optional instructions shown to users explaining how this section is scored, e.g. "If you answer yes, you will score 1 point."'),
HasMany::make('Questions', 'questions', QuestionResource::class),
];