在活动管理资源的索引中呈现带有表单操作的自定义表单

时间:2018-04-20 15:27:06

标签: html ruby-on-rails activeadmin

我在我的应用程序中使用了活动管理员。我遇到了一种情况,我想在默认资源页面中添加一个表单和索引。所以我做的是,

ActiveAdmin.register Post do
   index do
     column : mycolumn
     panel 'Enter Details' do
       render partial : 'my semantic form'
     end
   end
end

我的语义表单有2个下拉字段和一个提交按钮。单击提交按钮时,必须调用一个动作。这里发生的是输入显示笨拙

 1. Is there a way to display the form elements in expected way
 2. I don't know where to define the form action upon clicking the submit button

1 个答案:

答案 0 :(得分:1)

我不建议这样做,但如果你真的必须看一下adding popup modals to the index page上的这篇文章。 wiki上还有一些其他文章。