Adam Kolkman
Adam Kolkman

Reputation: 132

ActiveAdmin custom values entered into form fields

I have an ActiveAdmin project in Rails 4. For some reason when I use the :value => some_value for a field nothing changes. It just shows up as an empty text field.

Here's an example of my form:

form do |f|
  f.inputs "Template Details" do
  f.input :inventory_type, :value => "test"
  f.input :body_type
  f.input :section
  f.input :formula
  f.input :trait
end
f.actions

The inventory_type field is blank when it renders. I've tried all the other fields with similar results.

Upvotes: 3

Views: 3663

Answers (1)

nistvan
nistvan

Reputation: 2960

Try this: :input_html => {:value => "test"}

Upvotes: 7

Related Questions