View Source MoonWeb.Examples.Design.Form.CheckboxExample.MultipleLive (Moon v2.86.0)

https://fly.io/phoenix-files/making-a-checkboxgroup-input/

Summary

Functions

Attributes

  • user (Phoenix.HTML.Form) - Defaults to %Phoenix.HTML.Form{source: #Ecto.Changeset<action: nil, changes: %{}, errors: [authentication: {"can't be blank", [validation: :required]}], data: #MoonWeb.Schema.User<>, valid?: false>, impl: Phoenix.HTML.FormData.Ecto.Changeset, id: "user", name: "user", data: %MoonWeb.Schema.User{__meta__: #Ecto.Schema.Metadata<:built, "users">, id: nil, username: "johndoe", password: "verysecret123", name: "First Last", email: "joe@doe.com", phone: nil, country: nil, gender: "male", document_filename: nil, agrees_to_terms_of_service: true, agrees_to_marketing_emails: true, permissions: [1, 2, 3], role: nil, authentication: nil}, action: nil, hidden: [], params: %{}, errors: [], options: [method: "post"], index: nil}.
  • permissions (:list) - Defaults to [%{value: 1, key: "Read"}, %{value: 2, key: "Write"}, %{value: 3, key: "Update"}, %{value: 4, key: "Delete"}, %{disabled: true, value: 5, key: "Nuclear war"}].

Functions

Link to this function

handle_event(binary, map, socket)

View Source

Callback implementation for Phoenix.LiveComponent.handle_event/3.

Attributes

  • user (Phoenix.HTML.Form) - Defaults to %Phoenix.HTML.Form{source: #Ecto.Changeset<action: nil, changes: %{}, errors: [authentication: {"can't be blank", [validation: :required]}], data: #MoonWeb.Schema.User<>, valid?: false>, impl: Phoenix.HTML.FormData.Ecto.Changeset, id: "user", name: "user", data: %MoonWeb.Schema.User{__meta__: #Ecto.Schema.Metadata<:built, "users">, id: nil, username: "johndoe", password: "verysecret123", name: "First Last", email: "joe@doe.com", phone: nil, country: nil, gender: "male", document_filename: nil, agrees_to_terms_of_service: true, agrees_to_marketing_emails: true, permissions: [1, 2, 3], role: nil, authentication: nil}, action: nil, hidden: [], params: %{}, errors: [], options: [method: "post"], index: nil}.
  • permissions (:list) - Defaults to [%{value: 1, key: "Read"}, %{value: 2, key: "Write"}, %{value: 3, key: "Update"}, %{value: 4, key: "Delete"}, %{disabled: true, value: 5, key: "Nuclear war"}].