Hello everyone
I had a question to which I cant understand how to implement it.
I have a parent live view which renders multiple child liveviews on a button click. Each child liveview has a form with a seperate submit button. I can render the child liveviews at will on the button click action.
Now the problem is that whenever I try to submit the form in the child template, it calls the appropriate handle_event in the the child liveview but the params are empty. I tried setting up phx_submit in the place where i am declaring the form along but it didnt work.
I am attaching my code below. Only the form for the child template.
P.S. I am giving an id to every child template that is rendered using the live_render function.
<%= f = form_for :details, "#"%>
<label class="form-control-label" for="title">Title</label><br>
<%= text_input f, :title, [class: "form-control"] %>
<%= error_tag f, :title %>
<br>
<label class="form-control-label" for="name">Name</label><br>
<%= text_input f, :name, [class: "form-control"] %>
<%= error_tag f, :name %>
<br>
<label class="form-control-label">Telephone number</label><br>
<%= text_input f, :telephone, [class: "form-control"] %>
<%= error_tag f, :telephone %>
<br>
<label class="form-control-label">Text caption</label><br>
<%= textarea f, :text_caption, [class: "form-control"] %>
<%= error_tag f, :text_caption %>
<br>
<label class="form-control-label">Banner</label><br>
<%= text_input f, :banner, [class: "form-control"] %>
<%= error_tag f, :banner %>
<br>
<label class="form-control-label pb-05" for="startTime">Start Time</label><br>
<%= time_input f, :start_time, [class: "form-control"] %>
<%= error_tag f, :start_time %>
<br>
<div class="add-event-button add-event-button-inter" phx-click="add_new_telephone">
<div class="add-event-button-text" ><%= submit "Add", class: "btn p-0"%></div>