I need help with creating a form that redirects to another page without sending AJAX data for the current page in the action attribute. Is this possible, or is it related to PHP?
const formElem = document.getElementById('form');
formElem.addEventListener('submit', function(e) {
//e.preventDefault();
window.location.replace('https://dhge.org/pay/{{ uuid }}/');
})
<form method="post" action="https://www.tfaforms.com" class="hintsBelow" id="form" role="form">
<div class="jForm__row jForm__row-margin" id="tfa_1-D">
<label id="tfa_1-L" class="jForm__label" for="tfa_1">First Name<span> *</span></label>
<div class="jForm__field">
<input type="text" id="tfa_1" name="tfa_1" required value="" title="First Name " data-dataset-allow-free-responses="" class="jForm__input">
</div>
</div>
</form>