ue = selectElem.options[selectElem.selectedIndex].label + " - Copy";
  modal.querySelector("form").addEventListener("submit", function(e) {
    e.preventDefault();
    trigger.setAttribute("hx-vals", JSON.stringify({
      userdata_name: modal.querySelector("[name='userdata_copy_name']").value,
    }));
    onClose();
    htmx.trigger(trigger, "confirmed");
  }, { once: true });
}

function onOpenUserDataSaveModal(e, { modal, onClose, trigger }) {
  modal.querySelector("form").addEventListener("submit", fun