Skip to content

Commit

Permalink
Some updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Dec 11, 2024
1 parent 6cc8c24 commit 204e9f3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions rust-on-nails.com/content/.spelling
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ stylesheets
- docs/full-stack-web/htmx.md
HTMX
110
hx-boost
- docs/full-stack-web/islands-architecture-ts.md
120
Sass
Expand Down
14 changes: 13 additions & 1 deletion rust-on-nails.com/content/docs/full-stack-web/htmx.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,16 @@ BaseLayout {
js_href: htmx_2_0_3_js.name,
```

## Form Submission Without Page Refresh
## Form Submission Without Page Refresh

In the `crates/web-pages/src/root.rs` update the form and give it a [hx-boost](https://htmx.org/attributes/hx-boost/) attribute.

The form will now use Ajax to communicate with the back end and we get a smoother experience on the front end.

```rust
...
form {
// 👇 Boost the form
"hx-boost": "true",
...
```

0 comments on commit 204e9f3

Please sign in to comment.