I would like to set up for an Active Admin form a field called field_example (string type), a basic dropdown that would show
- option 1
- option 2
- option 3
- freely inputed field
I would like to enable the user to choose of the 3 basic options but if he does not recognize himself in those 3 options, be able to type freely another string (this string would not have to be added to the list of options for future forms edition). He could type anything.
Is it possible?
My code today:
admin/model.rb
f.input :field_example,
as: :select,
collection: LIST_OF_OPTIONS,
prompt: true
config/initializers/active_admin_constants
LIST_OF_OPTIONS = ["option1","option2", "option3"]