Hi. I ran this command:
mix phx.gen.live Forms Form forms domain:string bg_color:string primary_color:string title:string description:text
Then ran the migrations and added routes to the web scope.
However, when I try to visit the /forms/new
route, I’m getting this error:
protocol Phoenix.HTML.FormData not implemented for %MyProject.Forms.Form{__meta__: #Ecto.Schema.Metadata<:built, "forms">, id: nil, domain: nil, description: nil, title: nil, bg_color: nil, primary_color: nil, inserted_at: nil, updated_at: nil} of type SuperSubstack.Forms.Form (a struct). This protocol is implemented for the following type(s): Ecto.Changeset, Map
I haven’t made any changes besides the generated code, so surprised to see this error. Any idea why it’s there and the ways to fix it? Maybe there is a name collision of some sort? (“form”)