Hello, I am building multiplayer forms with LiveView.
I want to disable the input when it’s selected by another user.
Here’s what I got (will explain why it doesn’t work)
= text_input :post, :name, value: @value, phx_focus: “user_focus”, phx_keyup: “user_keyup”, phx_blur: “user_blur”, class: “form-input big-input”, autocomplete: “off”, disabled: @disabled
value: @value works perfectly with LiveView, but disabled: @disabled doesn’t work, this is because in html value=“blah blah blah” sets the value, but disabled=“true” is still disabled. disabled=“true” and disabled=“false” are the same thing, the input is disabled just with the presence of the word disabled.
Anyone have a way around this to just manipulate the key “e.g. disabled: part” with LiveView and not just value.