I'm trying to build a form, with formtastic, inside an active_admin model. The problem is I need a certain script tag and other raw HTML stuff directly inside or around the form.
I'm doing it with the normal form block:
form do |f|
f.inputs :name => "User Details", :for => :user do |user_form|
user_form.input :first_name, :required => true
...
How do I embed a simple div tag right in between? Or even a script tag?
I thought about using a render :partial
, but I want to know if the above method is possible first. Thanks!
You can insert a div or javascript like this:
In the current ActiveAdmin the form_buffers is deprecated. Instead it's possible to do the following:
Active admin created a DSL on top of Formtastic according to their docs
So you can now do: