adds help texts
This commit is contained in:
@@ -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),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user