In LiveView how can I pass my data back to the controller? Non-liveview like Route.path_helper(conn, :new, user: @user, employee: @employee). I need the same map or keyword list as shown.
This is my latest iteration. I need those user and employee fields attached to each form, so I can’t just use html. Where can I put such a list of values here?
<.form let={_f} for={:alert} phx-submit={:alert} #user: @user, employee: @employee>
<%= submit "Alert1", class: "btn btn-primary" %>
</.form>
Then in the controller. I need value to be a map (or whatever)
def handle_event("alert", value, socket) do
IO.inspect(value) => {} # is currently an empty map. Only the first arg is correct.
I’ve asked on this question use form_for in liveview component without model or changeset. And this is similar to this too live_component inside of a form_for






















