2

I have two select fields and I want to show the second dropdown based on previously selected dropdown value

e.g:

form do |record|
...
 select :app_ids, App.all.map{|app| [app.name, app.id]}, {label: 'App'}
 select :role_ids, AppRole.where(app_id: app_ids).roles, {label: 'Role'} # Here I want to use the app_ids

Does trestle supports getting the value of previously selected value or should I need to use ajax if so how do I render the partial file in trestle admin

M.R
  • 610
  • 2
  • 10
  • 34

0 Answers0