Skip to content

Commit

Permalink
add the checked function for html
Browse files Browse the repository at this point in the history
  • Loading branch information
joelanman committed Dec 21, 2022
1 parent 0306592 commit fe06ff8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/v13/documentation/pass-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ module.exports = {

## Advanced features

### Checkboxes and radios using HTML

If you are using the HTML components instead of Nunjucks, you need to use the `checked` function for radios and checkboxes. For example:

```
<input class="govuk-checkboxes__input" id="waste-2" name="waste" type="checkbox" value="mines" {{ checked('waste','mines') }}>
```

### Using the data on the server

You can access the data on the server in a route function
Expand Down

0 comments on commit fe06ff8

Please sign in to comment.