Skip to content

Commit 4ef876a

Browse files
authored
Update README.md
1 parent 38c4e29 commit 4ef876a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extensions:
3030

3131
### Example form
3232

33-
```
33+
```php
3434
$form->addAjaxSelect('client_id', 'Klient', function (string $query, ?int $default = 0) {
3535
if ($default) {
3636
$row = $this->repository->getRow($default);
@@ -46,7 +46,7 @@ $form->addAjaxSelect('client_id', 'Klient', function (string $query, ?int $defau
4646
Parameter `$query` contains text being searched, parametered `$default` contains value which is set as default (for example when editing existing entry, you need to provide saved key => value in your callback).
4747

4848
### Javascript snippet using select2
49-
```
49+
```js
5050
if ($(this).data('ajaxselect')) {
5151
$(this).select2({
5252
tokenSeparators: [',', ' '],

0 commit comments

Comments
 (0)