-
-
Notifications
You must be signed in to change notification settings - Fork 254
Open
Description
Code example :
Flexible::make('Promotion Action', 'actions')
->addLayout('Media', 'media', [
Select::make('Type', 'details->type')
->options([
'image-01' => 'ImageLink',
'video' => 'VideoLink',
'facebook' => 'FacebookLink',
'youtube' => 'YoutubeLink',
])
->rules('required'),
FileManager::make(__('Banner'), 'image_path')
->multiple()
->limit(3)
->help('Multiple upload order by EN,KM,ZH')
->hideFromIndex()
->hide()
->dependsOn('details->type', function (FileManager $field, NovaRequest $request, FormData $formData) {
$details = data_get($formData, 'details.type');
if ($details === 'image') {
$field->show();
} else {
$field->hide();
}
}),
])
->fullWidth()
->button('Add Action'),
daanadriaan
Metadata
Metadata
Assignees
Labels
No labels