Free Estimate
Please share your details below and we will get in touch with you soon.
<style>
[name$="-alter"] ,
[data-tilda-name$="-alter"]{display: none}
</style>
<script>
$( document ).ready(function() {
$(document).on('change',' input[name$="-alter"] ',function(event){
let Name = $(this).attr('name');
let thGr = $(this).closest('.t-input-group');
if (Name != undefined) {
altInp = Name.includes('-alter');
if(altInp){
let ln = thGr.find('input[name="'+Name+'"]').length-1;
let indNum = $('input[name="'+Name+'"]').index($(this));
if(ln == indNum){
thGr.next('div').find('input[name$="-alter"]').addClass('js-tilda-rule').attr('data-tilda-req',1).show();
}else{
thGr.next('div').find('input[name$="-alter"]').removeClass('js-tilda-rule').attr('data-tilda-req',1).hide().val('');
};
};
};
});
$(window).resize(function() {clearTimeout(window.resizedFinished); window.resizedFinished = setTimeout(function(){
$('input[type="radio"][name$="-alter"]').each(function(){
let wrapper = $(this).closest('.tn-elem');
if(wrapper.length){
$(this).closest('.t-input-block').find('.t-radio__control:first').click();
$(this).closest('.t-form__inputsbox').find('input[type="text"][name$="-alter"]').removeClass('js-tilda-rule').attr('data-tilda-req',1).val('');
};
});
}, 1000);});
});
</script>