use #cs-debug as default target for HTMX output
This commit is contained in:
parent
54ae6026eb
commit
658420af94
3 changed files with 3 additions and 7 deletions
|
@ -2,7 +2,7 @@
|
||||||
{{- $name := .Get "name" | default "data" -}}
|
{{- $name := .Get "name" | default "data" -}}
|
||||||
{{- $action := .Get "action" | default "data" -}}
|
{{- $action := .Get "action" | default "data" -}}
|
||||||
{{- $domain := .Get "domain" | default $.Page.Params.api.domain -}}
|
{{- $domain := .Get "domain" | default $.Page.Params.api.domain -}}
|
||||||
{{- $target := .Get "target" | default "#debug" -}}
|
{{- $target := .Get "target" | default "#cs-debug" -}}
|
||||||
{{- $label := "Submit" -}}
|
{{- $label := "Submit" -}}
|
||||||
<form name="{{ $name }}" hx-target="{{ $target }}"
|
<form name="{{ $name }}" hx-target="{{ $target }}"
|
||||||
hx-post="{{ $root }}/{{ $domain }}/{{ $action }}">
|
hx-post="{{ $root }}/{{ $domain }}/{{ $action }}">
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
Hello World!
|
Hello World!
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<form hx-post="/hx/test/data" hx-target="#output">
|
<form hx-post="/hx/test/data" hx-target="#cs-debug">
|
||||||
<input name="info">
|
<input name="info">
|
||||||
<button>Post to API</button>
|
<button>Post to API</button>
|
||||||
</form>
|
</form>
|
||||||
<div id="output" />
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ img:
|
||||||
pageid: login
|
pageid: login
|
||||||
domains: []
|
domains: []
|
||||||
topics: []
|
topics: []
|
||||||
date: 2024-07-22
|
date: 2024-07-24
|
||||||
author: helmutm
|
author: helmutm
|
||||||
draft: false
|
draft: false
|
||||||
weight: 900
|
weight: 900
|
||||||
|
@ -27,6 +27,3 @@ Please enter login data:
|
||||||
|
|
||||||
{{< /hx/data-form >}}
|
{{< /hx/data-form >}}
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
{{< hx/debug >}}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue