Open Moses-Alero opened 9 months ago
Maybe you can use hx-include like
<div id="chat_input" >
<input type="text" name="message-text" placeholder="Type a message...">
<button ws-send hx-include="[name='message-text']">Send</button>
</div>
this would include the value of the input with the request, I hope this solves your problem.
Happy holidays!
Thanks a lot.
Currently, sending a WebSocket message (or any input value at all as far as I know) to a server requires the input to be inside a form as described below
Suggested change/improvement
Here Input values entered from any suitable container other than forms can be sent to the server.