1

is there a way to set a default input value for batch_actions?

e.g. I have 3 inputs fields, I want to save these in a session, but I couldn't figure out, how to set a default text in my form. form -> { 'Bla' :text } ... do you guys know how I can set a default value?

Thanks in advance for your help.

Compo
  • 36,585
  • 5
  • 27
  • 39
  • If you are using generic form like [this](http://guides.rubyonrails.org/form_helpers.html#a-generic-search-form), set like `<%= text_field_tag(:q, 'default text') %>` – iGian Apr 28 '18 at 19:35
  • The batch action form is a jQuery modal dialog, not a Rails form. – Piers C Apr 30 '18 at 13:28

1 Answers1

0

Not out of the box, no. If you are really serious you can customize modal_dialog.js and batch_actions/controller.rb, for example https://github.com/activeadmin/activeadmin/pull/3965/files

Piers C
  • 2,880
  • 1
  • 23
  • 29