0.0.296 remove errors after typing in fields

This commit is contained in:
2023-12-02 00:06:17 +03:00
parent 1720e156d2
commit ea92feab27
4 changed files with 52 additions and 10 deletions

View File

@@ -913,6 +913,8 @@ function RequestCommercialOffer (el){
let feedback_form = document.querySelector('.feedback_form')
if(feedback_form){
feedback_form.innerHTML = data.responseJSON.html;
// let incorrect_block = document.querySelectorAll('.inputs_l')
}
let commercial_offer = document.querySelector('.commercial_offer')
@@ -939,6 +941,31 @@ function RequestCommercialOffer (el){
}
function hideErrors(el) {
let error_feeedback_text = document.getElementById('error_feedback_text')
let error_feeedback = el.nextElementSibling
let counter_text = document.querySelector('.counter-text')
if(error_feeedback === counter_text ){
error_feeedback_text.classList.add('hide')
}else {
error_feeedback.classList.add('hide')
}
el.form[3].offsetParent.nextElementSibling
// if(el.nextElementSibling === errorFeeedback){
// errorFeeedback.classList.add('hide')
// }
}
// function SendFeedbackForm (el){