how do you group select_tag and text_field_tag?

Posted by Eytan on Stack Overflow See other posts from Stack Overflow or by Eytan
Published on 2012-08-30T21:37:01Z Indexed on 2012/08/30 21:38 UTC
Read the original article Hit count: 153

Filed under:

I'm trying to build a form where a user can select an existing category, or define their own.

My form looks something like this...

<%= f.select :category, category_options, prompt: "Select">
<%= f.text_field :category %>

However, this UI is confusing. The user can select something in the select box, and type in a custom category. In this case, the final result is not obvious.

Do you guys have any recommendations on how to handle this situation?

© Stack Overflow or respective owner

Related posts about ruby-on-rails