Skip to content
This repository was archived by the owner on Jan 2, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Docs
  • Loading branch information
pascalbaljet committed Feb 11, 2021
commit 9ae0990456b73f79534c8e308b5aed2ff4dcafb4
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

All notable changes to `laravel-form-components` will be documented in this file

## 2.5.3 - 2020-02-11

- Bugfix for setting radio elements as checked/default

## 2.5.2 - 2020-01-04

- Generate ID by name *and* value (checkbox and radio elements only)

## 2.5.1 - 2020-12-22

- Use the `name` attribute to auto-generate an ID (if not set)

## 2.5.0 - 2020-12-22

- Support for `BelongsToMany`, `MorphMany`, and `MorphToMany` relationships (select element)
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,17 @@ You can group checkbox and radio elements on the same horizontal row by adding a

```blade
<x-form-group name="notification_channel" label="How do you want to receive your notifications?" inline>
<x-form-checkbox name="notification_channel" value="mail" label="Mail" />
<x-form-checkbox name="notification_channel" value="slack" label="Slack" />
<x-form-radio name="notification_channel" value="mail" label="Mail" />
<x-form-radio name="notification_channel" value="slack" label="Slack" />
</x-form-group>
```

When you're not using target binding, you can use the `default` attribute the mark a radio element as checked:

```blade
<x-form-group name="notification_channel" label="How do you want to receive your notifications?">
<x-form-radio name="notification_channel" value="mail" label="Mail" default />
<x-form-radio name="notification_channel" value="slack" label="Slack" />
</x-form-group>
```

Expand Down