How can I get back the normal (non-modal) CRUD interface from phx.gen.live?

The Phoenix generators in the past were more useful for consumer type apps because it generated normal CRUD UIs that allowed for quick iteration and exploration, then you could add/remove fields easily, finally you could put on some paint to make it pop.

The new version seems more “internal” or B2B focused with it’s modal type CRUD.

Is there a way to get back the normal non-modal CRUD generation?

Instead of mix phx.gen.live you can use mix phx.gen.html or am I misunderstanding what you are asking?

This generates a deadview traditional MVC right? I want liveviews

How about creating a separate project with an older version of Phoenix, then just running the generator and copying the files over?

In fact I guess you just want to get rid of the modal for the edit page. You’ll have to manually add that one. The rest of the generated pages are useable the “old” way.

The templates are defined here: phoenix/priv/templates at main · phoenixframework/phoenix · GitHub

You can copy the ones you need from an earlier version and add them to the same location in the priv folder of your application to override the templates.

1 Like

Check Customizing Phoenix Generators · The Phoenix Files for that approach.

2 Likes

This looks promising! I wonder if anyone has needed this and made the change before. I can’t be the only one looking for simple crud forms right?

I got it now.

I am working on a tool that will help developers in your situation.