Unable to handle complex changeset for userform in phx

This is my user_form.html.heex code facing issue is deploying email changeset as emails schema has it’s own changeset

<.simple_form :let={f} for={@changeset} action={@action}>
  <.error :if={@changeset.action}>
    Oops, something went wrong! Please check the errors below.
  </.error>
  <.input field={f[:userid]} type="number" label="Userid" />
  <.input field={f[:roleid]} type="number" label="Roleid" />
  <.input field={f[:managerid]} type="number" label="Managerid" />
  <.input field={f[:name]} type="text" label="Name" />
  <.input field={f[:emailid]} type="text" label="Emailid" />
  <.input field={f[:username]} type="text" label="Username" />
  <.input field={f[:password]} type="text" label="Password" />
  
 
  <%# Email fields %>
   
  <%= for _email_changeset <- @changeset.changes.emails do %>
    <%= f.simple_fields_for :emails, fn ef -> %>
      <%= ef.input :address, label: "Email Address" %>
      <%= ef.input :verified, label: "Verified", as: :boolean %>
    <% end %>
  <% end %>
 


  <:actions>
    <.button>Save User</.button>
  </:actions>
</.simple_form>

My changeset look like this

#Ecto.Changeset<
  action: nil,
  changes: %{
    name: "Am Kumar",
    password: "Dekh",
    userid: 1,
    roleid: 0,
    managerid: 0,
    emailid: "am.kumar@gmail.com",
    username: "amkumar",
    emails: [
      #Ecto.Changeset<
        action: :insert,
        changes: %{address: "b@apple.com", verified: false},
        errors: [],
        data: #Pbchat.Accounts.Email<>,
        valid?: true
      >,
      #Ecto.Changeset<
        action: :insert,
        changes: %{address: "a@apple.com", verified: false},
        errors: [],
        data: #Pbchat.Accounts.Email<>,
        valid?: true
      >
    ]
  },
  errors: [],
  data: #Pbchat.Accounts.User<>,
  valid?: true
>

What specifically is or isn’t happening that should? A reader can’t run this code to see what happens, so you’ll get much better help if you describe what you can see.

This is strange: if the loop variable of for isn’t used, how does the rest of the loop know which element it’s looking at?

Apart from the fn ef ->, this looks like code to use the Ruby simple_form library.

The right place to start is the documentation for inputs_for in Phoenix.

i would like to know what should be the code to implement emails which is in my main changeset,it would be great if you could provide code for this