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

@@ -87,25 +87,30 @@ public function fields(NovaRequest $request): array
BelongsTo::make('Question Group', 'questionGroup', QuestionGroupResource::class)
->sortable()
->filterable(),
->filterable()
->help('The group this question belongs to. Questions are shown together by group in the questionnaire.'),
Textarea::make('Text')
->rules('required')
->updateRules('required'),
->updateRules('required')
->help('The full question text shown to the user in the questionnaire.'),
Boolean::make('Has Yes')
->sortable()
->filterable(),
->filterable()
->help('When enabled, a "Yes" answer option is shown for this question.'),
Boolean::make('Has No')
->sortable()
->filterable(),
->filterable()
->help('When enabled, a "No" answer option is shown for this question.'),
Boolean::make('Has NA', 'has_na')
->sortable()
->filterable(),
->filterable()
->help('When enabled, a "Not Applicable" answer option is shown for this question.'),
Select::make('Details')
->options([
@@ -117,15 +122,18 @@ public function fields(NovaRequest $request): array
->displayUsingLabels()
->nullable()
->sortable()
->filterable(),
->filterable()
->help('Controls when the user is asked for additional details. "Required" always asks, "Optional" lets the user choose, "Required on Yes/No" only asks when that answer is selected.'),
Number::make('Sort Order')
->sortable()
->filterable(),
->filterable()
->help('Controls the display order within the question group. Lower numbers appear first.'),
Boolean::make('Is Scored')
->sortable()
->filterable(),
->filterable()
->help('When enabled, this question counts toward the total score. A "Yes" answer scores 1 point.'),
HasMany::make('Answers', 'answers', AnswerResource::class),
];