Prompt default value
Dear 1cg, dear developers,
As a feature request, is it possible in the future to add to hx-prompt an optional default value? It would be useful :)
- https://developer.mozilla.org/en-US/docs/Web/API/Window/prompt
Thank you
Hey everyone. I realise it's getting on for three years since this suggestion was made, but I believe this suggestion has legs: it would be incredibly useful to be able to pre-populate a prompt when it is shown, rather than just having an empty text field.
I know there's other options, such as SweetAlert2, or putting a form inside a Bootstrap modal, but I am trying to keep complexity to a minimum in a project I am working on.
I wanted this too, so I added an attribute hx-prompt-default (literally a two line change lol). Hope it gets approved or maybe just helped someone!