Skip to content

Commit ff321f8

Browse files
committed
mention dataform widget
1 parent 1451ca6 commit ff321f8

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

7.x-dev/base-widgets.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,27 @@ class ChartjsPieController extends ChartController
347347

348348
```
349349

350+
<a name="dataform"></a>
351+
### Dataform
352+
353+
Shows a dataform component from a particular CrudController. For more info about the configuration parameter, please see the [dataform component docs](/docs/{{version}}/base-components#dataform).
354+
355+
```php
356+
[
357+
'type' => 'dataform',
358+
'controller' => 'App\Http\Controllers\Admin\InvoiceCrudController',
359+
'name' => 'invoice_form',
360+
'setup' => function($crud, $parent) {
361+
// you can use this closure to modify your CrudController definition.
362+
$crud->removeField('notes');
363+
}
364+
]
365+
```
366+
350367
<hr>
351368

352369
<a name="datatable"></a>
353-
### DataTable
370+
### Datatable
354371

355372
Shows a datatable component from a particular CrudController. For more info about the configuration parameter, please see the [datatable component docs](/docs/{{version}}/base-components#datatable).
356373

@@ -360,7 +377,7 @@ Shows a datatable component from a particular CrudController. For more info abou
360377
'controller' => 'App\Http\Controllers\Admin\PetShop\InvoiceCrudController',
361378
'name' => 'invoices',
362379
'setup' => function($crud, $parent) {
363-
// you can use this closure to modify your CrudController definition.
380+
// you can use this closure to modify your CrudController definition.
364381
if ($parent) {
365382
$crud->addClause('where', 'owner_id', $parent->id);
366383
}
@@ -388,7 +405,7 @@ Allows you to include multiple widgets within a "div" element with the attribute
388405
]
389406
```
390407

391-
Anything you specify on this widget, other than ```type``` and ```content```, has to be a string, and will be considered an attribute of the "div" element.
408+
Anything you specify on this widget, other than ```type``` and ```content```, has to be a string, and will be considered an attribute of the "div" element.
392409
For example, in the following snippet, ```class``` and ```custom-attribute``` are attributes of the "div" element:
393410

394411
```php

0 commit comments

Comments
 (0)