Skip to content

Commit 223b46e

Browse files
author
Chepurnoy
committed
update readme
1 parent b4a1247 commit 223b46e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,24 @@ And add to your controller
4444
];
4545
}
4646
```
47+
Usage Editable widget
48+
======================================
49+
* As a widget with a model
50+
51+
```php
52+
\yii2mod\editable\Editable::widget( [
53+
'model' => $model,
54+
'attribute' => 'firstName',
55+
'url' => '/profile/update'
56+
]);
57+
```
58+
59+
* With ActiveForm
60+
61+
```php
62+
echo $form->field($model, "firstName")->widget(\yii2mod\editable\Editable::className(), [
63+
'url' => '/profile/update',
64+
'mode' => 'popup'
65+
]);
66+
67+
```

0 commit comments

Comments
 (0)