Where is the hello world of tubo?

I’m looking if I can replace htmx with hotwire, and I try to use it… but it does not have any info on how setup a simple page without going with ruby! (I’m using Rust).

I need to see if I can make form submits/validations to work:

<form id="app" name="Form" method="POST" hx-trigger="keyup changed delay:2s from:.input">
    <content id='content'>
            <input  type="text" id="qty" name="qty" class="input" hx-post="" hx-swap="outerHTML" hx-target="#content" hx-select="#content">

            <input  type="text" id="discount" name="discount" class="input" hx-post="" hx-swap="outerHTML" hx-target="#content" hx-select="#content">
   </content>
</form>

So I try:

<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <script src="https://cdn.skypack.dev/@hotwired/turbo" type="module"></script>
</head>
<body>

<turbo-frame id="turbo">
    <content id='content'>
            <input  type="text" id="qty" name="qty" class="input">

            <input  type="text" id="discount" name="discount" class="input">
   </content>
 </turbo-frame>
</form>

</body>
</html>

But I don’t see it trigger anything?

The recommended approach is:

  1. Get the form working in vanilla HTML (without any javascript or turbo)
  2. Once the form is working, enhance using javascript/turbo.

FYI: Your example above has invalid HTML. You need an opening form tag with an action and method.
You probably also want to add a submit button.

<form action="/action_page.php" method="get">
  <input  type="text" id="qty" name="qty" class="input">
  <input  type="text" id="discount" name="discount" class="input">
  <input type="submit" value="Submit">
</form>