document.addEventListener("DOMContentLoaded", function () {
    document
        .getElementById("SubmitProfileEditBtn")
        .addEventListener("click", function (e) {
            e.preventDefault();
            const FormEdit = document.getElementById("ProfileEditForm");
            const selectState = document.getElementById("state");

            for (let i = 0; i < selectState.options.length; i++) {
                let opt = selectState.options[i];
                opt.value = opt.text;
            }

            FormEdit.submit();
        });

});
