phx-value-value={true}
arrives as "value" => ""
in the message handler. Please, help
{:phoenix, β~> 1.7.6β}
{:phoenix_live_view, β~> 0.19.0β},
phx-value-value={true}
arrives as "value" => ""
in the message handler. Please, help
{:phoenix, β~> 1.7.6β}
{:phoenix_live_view, β~> 0.19.0β},
Thatβs by default to support <input type="checkbox" checked={boolean}>
. You can always do attr={"#{boolean}"}
to force serialization to string.
Thank you for the fast response @LostKobrakai! Forgot I could do this with boolean, I instead wrote the if
thing I thought
Phoenix.HTML.Safe
was responsible for serialization, feeling I was mislead.
May I ask how exactly checked={boolean}
comes into play here?