edisonywh / backoffice

Admin tool built with the PETAL stack
MIT License
217 stars 15 forks source link

Render different forms? #4

Open edisonywh opened 3 years ago

edisonywh commented 3 years ago

zachdaniel from Ash pointed out one feature he has in ash_admin is the ability to have multiple forms. This could be a pretty cool idea, I can imagine the declaration to read something like:


form :create do
  ...
end

form :edit do
 ...
end

form :custom do
  ...
end

Questions

edisonywh commented 3 years ago

With #11 we can actually allow this, but form is currently limited to live actions (:new and :edit respectively).

We can try to further think of ways to make this work, and to think about how the user flow would be - would it be buttons at the form level that users can toggle? Maybe on click for those we can rerender with the new form fields