Skip to content

Commit 75462bd

Browse files
committed
checked = value for checkboxes
1 parent 9135861 commit 75462bd

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
- Update ApexCharts to [v4.3.0](https://github.com/apexcharts/apexcharts.js/releases/tag/v4.3.0).
3535
- New `article` property in the text component to display text in a more readable, article-like format.
3636
- Add support for evaluating calls to `coalesce` inside sqlpage functions. This means you can now use `coalesce` inside arguments of sqlpage functions, and it will be evaluated inside sqlpage. For instance, this lets you call `sqlpage.link(coalesce($url, 'https://sql-page.com'))` to create a link that will use the value of `$url` if it is not null, or fallback to `https://sql-page.com` if it is null.
37+
- In the form component, allow the usage of the `value` property in checkboxes and radio buttons. The custom `checked` property still works, but it is now optional.
3738

3839
## 0.31.0 (2024-11-24)
3940

sqlpage/templates/form.handlebars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{{#if (or (eq type "radio") (eq type "checkbox"))}}
1818
<div class="form-selectgroup form-selectgroup-boxes d-flex flex-column mx-0 my-1 col-md-{{default width 12}}">
1919
<label class="form-selectgroup-item flex-fill mx-0">
20-
<input type="{{type}}" {{#if id}}id="{{id}}" {{/if}}name="{{name}}" value="{{value}}" {{#if required}}required{{/if}} {{#if checked}}checked{{/if}} class="form-selectgroup-input">
20+
<input type="{{type}}" {{#if id}}id="{{id}}" {{/if}}name="{{name}}" value="{{value}}" {{#if required}}required{{/if}} {{#if (or checked value)}}checked{{/if}} class="form-selectgroup-input">
2121
<div class="form-selectgroup-label d-flex align-items-center p-3">
2222
<div class="me-3">
2323
<span class="form-selectgroup-check"></span>

0 commit comments

Comments
 (0)