Why handling Input requires Form(phx-change) on liveview

i got several input element on my view.

most input elements are need to trigger simple event on change, so i tried to add phx-change on such input.
but it seems, without form, phx-change does not work.

each input triggers different things,
and already there is a form on the page so wrap all the inputs in a single form will create nested form.

should i wrap each input with a unique form?
then why such design? is there some kind of reference for that?

you still need a single parent form to handle the phx-submit, but phx-change has been supported in individual inputs for several releases now :slight_smile:

2 Likes