I am currently developing a lightweight web application tailored for the admissions team of a healthcare organization. The goal is to have potential customers (patients) fill out forms on our website, with my app allowing the admissions staff to view a list of these forms and assign each patient submission to a specific member of the admissions team. To achieve this, I have integrated a select element in every row of the search results, enabling users to associate each form entry with a team member through a dropdown selection. Additionally, I've included another select element to track the status of each patient (whether they have been contacted, require follow-up, etc.). The patient form submissions are displayed as search results based on the following HTML template.
<template id="rowtemplate">
<tr scope="row">
<th class="col1" id="patient">1</th><!--PROBLEM - NO IDs in Template...-->
<th class="col2">1</th>
<th class="col3">1</th>
<th class="col4">1</th>
<th class="col5"><select class="form-select staff" id="staffDD"> <!--PROBLEM - NO IDs in Template...-->
<option>Assign To</option>
<option>Kristen</option>
<option>Heather</option>
<option>Tammy</option>
</select> </th>
<th class="col6"><select class="form-select status" id="newStatus">
<option selected>New Status</option>
<option value="Needs Contact">Needs Contact</option>
<option value="Needs Follow-up">Needs Follow-up</option>
<option value="Contacted">Contacted</option>
<option value="Not Interested">Not Interested</option>
<option value = "Enrolled">Enrolled</option>
<option value="Alumni">Alumni</option>
</select> </th>
<th class="col7"><button class="btn-primary-light add" id="detailbutton">DETAILS</button></th>
</tr>
</template>
My primary question revolves around capturing the selected item from the dropdown menu and passing it to the server side. While combining the chosen selection with the patient name or ID appears plausible for sending to the server, extracting data from the staff assignment select poses challenges. One method could involve including a submit choices button on each row to append the selected data as a data attribute on that particular button. Subsequently, JavaScript could be utilized to acquire the patient's name and staff selection via click events on the submit button. Are there alternative methods to retrieve information from the search result row without relying on a submit button?
Any insights or suggestions regarding techniques would be greatly appreciated.