Hey
we would like to have a panel view form which ist submitting the Data. But unlike in Dialogs it seems views have no callback functionality right?
the dialog is looking like that and working
'create' => [
'pattern' => 'articles/create',
'load' => function () use ($fieldDefinitions) {
return [
'component' => 'k-form-dialog',
'props' => [
'fields' => $fieldDefinitions['articleBasic'],
]
];
},
'submit' => function () {
try {
\DoconoShop\Models\Article::create(get());
return true;
} catch (Throwable $e) {
return false;
}
}
],
the view is looking like that but submit, save or update is not working
'article-detail' => [
'pattern' => 'articles/(:any)',
'action' => function (int $id) use ($fieldDefinitions) {
$article = \DoconoShop\Models\Article::find($id);
return [
'component' => 'd-article-details',
'props' => [
'article' => $article->toArray(),
'fields' => $fieldDefinitions['articleExtended']
],
'breadcrumb' =>
function () use ($article) {
return [
[
'label' => $article->name,
'url' => '/articles/' . $article->id
]
];
}
];
},
'submit' => function (int $id) {
ray('submitted');
},
'save' => function (int $id) {
ray('saved');
},
'update' => function (int $id) {
ray('updated');
}
],
any suggestions?
thanks in advance!