0

How do I create a custom input field in Active admin?

This is for an input field gender, which would contain ["Male","Female"]

olleh
  • 1,248
  • 5
  • 16
  • 43

1 Answers1

5
form do |f|
  f.input :gender, collection: ["Male", "Female"]
  ..
end
Santhosh
  • 28,097
  • 9
  • 82
  • 87
  • Hi Santosh, by doing this i should manually include the rest of the Attributes in the input field right? Is there anyway to accomplish this without manually inputting the rest of the attributes? – olleh Dec 03 '14 at 10:03
  • Any thoughts regarding my comment above? – olleh Dec 04 '14 at 01:55
  • When you add a form block, you are overriding the default form. As far as I know, you cannot override specific input fields. – Santhosh Dec 04 '14 at 04:50