#Getting fns: submit, search_input, page_path, form_for

7 messages · Page 1 of 1 (latest)

wooden flame
#

How do I make these functions work in .heex?
(submit, search_input, page_path, form_for)

deps:

elixir: "~> 1.16.2",
{:phoenix, "~> 1.7.12"},

.heex file:

<%= form_for @conn, page_path(@conn, :index), [method: :get, class: "pull-right"], fn f -> %>
  <label>
    <%= search_input(f, :q) %>
    <%= submit "Search" %>
  </label>
<% end %>
sleek ibex
#

this is all deprecated and no longer the way you do things in Phoenix. You might be following an old outdated tutorial? Or are you trying to upgrade an old project?

wooden flame
#

I am learning Phoenix by reading several books, but I guess, they are outdated. Nothing works, I am constantly fighting with making anything work.

What books, course or a set of tutorials would you recommend to learn programming using Phoenix v1.7?

sleek ibex
#

these are kept up-to-date with the latest version, because they also act as the API documentation. It will always be as updated as possible

wooden flame
#

How to I find info/tutorials on building forms, search fields etc. with the new dot-syntax for .heex?