diff --git a/lib/phoenix_html/form.ex b/lib/phoenix_html/form.ex index a8a5dce..820ad30 100644 --- a/lib/phoenix_html/form.ex +++ b/lib/phoenix_html/form.ex @@ -261,9 +261,17 @@ defmodule Phoenix.HTML.Form do ## Examples options_for_select(["Admin": "admin", "User": "user"], "admin") - #=> + #=> #=> + Multiple selected values: + + options_for_select(["Admin": "admin", "User": "user", "Moderator": "moderator"], + ["admin", "moderator"]) + #=> + #=> + #=> + Groups are also supported: options_for_select(["Europe": ["UK", "Sweden", "France"], ...], nil)