Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 200
Adam Kolkman Avatar asked May 25 '26 03:05

Adam Kolkman


1 Answers

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

like image 106
nistvan Avatar answered May 26 '26 18:05

nistvan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!