Run mix --no-html and now want html pages

Hello all,

I run my generator with --no-html. Now, I have progressed somewhat with my app but I need a few html pages for my admin dashboard.
I added phoenix_html but having issues like form_for being undefined on my new.html.eex page.

Any ideas what I could include to solve these issues?

Thanks in advance.

1 Like

Do you have a view? E.g. if your app is named “app”, and your template is for articles, then you should have a file called app_web/views/article_view.ex. Inside that you’d have this:

defmodule AppWeb.ArticleView do
  use AppWeb, :view

You’re probably missing imports in my_app_web.ex.


Yes, I have a app_web/views/upload_view.ex file.

@LostKobrakai Great catch! :slight_smile:

In my_app_web.ex I was missing this line:

def view do
    quote do

      use Phoenix.HTML # This line


Edit: Posted in the wrong thread. Sorry guys.