How to set selected option in select?
#68
Unanswered
janpeterka
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm probably missing something quite obvious, but I'm unable to set selected option in my form.
I tried doing it like this:
Field(:chapter_style_name).select(*model.used_styles.to_a, selected: default_chapter_style_name), and also triedvalueanddefault, and nothig does the trick.Thanks for your help!
Beta Was this translation helpful? Give feedback.
All reactions