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

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"])}

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


Here is my template

<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 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..." %>

        text-align: center;
        margin: auto;
        padding: 10px;
        margin: auto;
        width: 50%;
        height: 60%;
        border: 5px solid #cccccc;
        padding: 10px;
        flex-grow: 1;

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