summaryrefslogtreecommitdiffstatshomepage
path: root/www/content/extensions/include-vals.md
blob: a4d25790eeb97ecc024439a0ae6917a6fc542680 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
+++
title = "include-vals"
+++

The `include-vals` extension allows you to programmatically include values in a request with
a `include-vals` attribute.  The value of this attribute is one or more name/value pairs, which
will be evaluated as the fields in a javascript object literal.

## Install

```html
<script src="https://unpkg.com/htmx.org@1.9.11/dist/ext/include-vals.js"></script>
```

## Usage

```html
<div hx-ext="include-vals">
    <div hx-get="/test" include-vals="included:true, computed: computeValue()">
      Will Include Additional Values
    </div>
</div>
```