-
Notifications
You must be signed in to change notification settings - Fork 963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation on using Form bindings with many-to-many or belongs-to fields lacking #3197
Closed
ponychicken opened this issue
Mar 28, 2024
· 3 comments
· May be fixed by phoenixframework/phoenix#5764
Closed
Documentation on using Form bindings with many-to-many or belongs-to fields lacking #3197
ponychicken opened this issue
Mar 28, 2024
· 3 comments
· May be fixed by phoenixframework/phoenix#5764
Comments
In https://hexdocs.pm/phoenix_html_helpers/PhoenixHTMLHelpers.Form.html#multiple_select/4 its quite nicely documented how to do this, but don't find a reference for Phoenix 1.7 |
Ok, I have to correct myself. But |
ponychicken
added a commit
to ponychicken/phoenix
that referenced
this issue
Mar 28, 2024
tracking on the phx side. Thanks! |
ponychicken
added a commit
to ponychicken/phoenix
that referenced
this issue
Feb 27, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In many applications you have some kind of belongs-to or many-to-many associations.
Like a blog post which has many categories, and each category has many blog posts.
It is straightforward to figure out how to make a
<.input type="select">
for an Enum,such as
The same approach fails when trying to add a similar dropdown field to select the categories
with
** (Protocol.UndefinedError) protocol Phoenix.HTML.Safe not implemented for %Category{...
Since this is a common pattern, I would suggest to add some paragraph into
guides/client/form-bindings.md
to explain the prefered way to solve this.The text was updated successfully, but these errors were encountered: