https://htmx.org logo
You could use an `hx-vals` attribute on the previo...
# 🔥-django-htmx
e
You could use an
hx-vals
attribute on the previous and next button to send along the extra value. https://htmx.org/attributes/hx-vals/
Copy code
html
<button hx-vals="{goTo: 'next'}">Next</button>
<button hx-vals="{goTo: 'prev'}">Previous</button>
or use
hx-include
on each button with a hidden input for each
Copy code
html
<input id="next-input type="hidden" name="goTo" value="next">
<input id="previous-input" type="hidden" name="goTo" value="prev">
<button hx-include="#next-input">Next</button>
<button hx-include="#previous-input">Previous</button>