Unable to create input form in leex template error: lib/fchatapp_web/live/chat_live.html.leex:12: undefined function form_for/3

My chat controller is
lib/fchatapp_web/live/chat_live.ex

defmodule FchatappWeb.ChatLive do
  use Phoenix.LiveView

  @imp true
  def mount(params, session, socket) do
    IO.inspect "In mount"
#    IO.inspect room
    IO.inspect params
    {:ok, assign(socket, room: params["room"])}
  end

  @imp true
  def handle_event(room_id,params,socket) do
    IO.inspect "Im here"
    {:noreply, socket}
  end

end

Here is my template
lib/fchatapp_web/live/chat_live.html.leex

<section id="main">
    <div id="header-text">
        <div id="title">
        <p >Currently Chatting In <strong><%= @room %></strong></p>
        <button><a href="">Leave Room</a></button>
        </div>
    </div>
    <br>

    <div id="chat-container">
        <div id="messages-container">Chat goes here</div>
        <%= f = form_for :chat, "#", id: "chat-form", phx_submit: :submit_message %>
        <%= text_input f, :message, placeholder: "Enter your message..." %>
        </form>
    </div>
</section>

<style>
    #title{
        text-align: center;
    }
    #header-text{
        margin: auto;
        padding: 10px;
    }
    #chat-container{
        margin: auto;
        width: 50%;
        height: 60%;
        border: 5px solid #cccccc;
        padding: 10px;
    }
    #messages-container{
        flex-grow: 1;
    }
</style>

Im new to elixir please help me to get this done Im following a tutorial Let’s build a real-time chat application with Elixir and Phoenix - YouTube

According docs Phoenix.HTML.Form — Phoenix.HTML v3.2.0
form_for/3 is deprecated. I think you need to use form_for/4

After doing some updates and blind changes that error is gone but not able to see form input field on the template