<form
class="" id="form" hx-post="/add/" hx-swap="afterbegin" hx-target="#big_list" hx-trigger="submit">
<input type="text" name="langue1" >
<input type="text" name="langue2">
<div id="errors"></div>
<button type="submit">GO</button>
</form>
<div id="big_list">
.....
</div>
Run Code Online (Sandbox Code Playgroud)
我有一个很大的列表#big_list,我希望#form在提交时只附加一行。
如何使用 htmx 处理错误并在 中显示消息#errors?
htmx ×1