I am not using LiveView at the moment. But I believe this problem can be solved using either JS or LiveView. I don’t have a preference, but generally, I think it’s best practice if I do use LiveView?
It can be done using LiveView, and is relatively simple if you have a good grasp on GenServers. LiveView can hook into form change events to do validation. See this example: Form bindings — Phoenix LiveView v0.20.2. In this validation step, you can change the LiveView assigns, which get referenced in the LiveView template. From there, you can iterate over the variable that you add to the assigns, and dynamically generate the <option> elements in your form. This generates a changing list of select elements before the submission stage, and is pretty useful in general.
I don’t know if it should be thought if in this way. Using LiveView is a pretty major technology decision for a project.