sergiocharm
Опытный

Меняю форму в зависимости от типа плательщика. Подглядел здесь на форуме.
Подскажите как сделать обходить обязательные поля, а то обязательное поле которое скрыто не дает оформлять покупку.
Подскажите как сделать обходить обязательные поля, а то обязательное поле которое скрыто не дает оформлять покупку.
Код:
<div id="lico-form">
<h4>Тип плательщика</h4>
<ul>
<li><label><input id="chkl" title="Отметьте если Вы являетесь физическим лицом" value="1" name = "level" type="radio" checked="checked" onchange="
document.getElementById('billing_first_name_field').style.display = this.checked ? 'block' : 'none';
document.getElementById('billing_address_1_field').style.display = this.checked ? 'block' : 'none';
document.getElementById('billing_phone_field').style.display = this.checked ? 'block' : 'none';
document.getElementById('billing_email_field').style.display = this.checked ? 'block' : 'none';
document.getElementById('billing_name_company_field').style.display = this.checked ? 'none' : 'block';
document.getElementById('billing_inn_field').style.display = this.checked ? 'none' : 'block';
document.getElementById('billing_kpp_field').style.display = this.checked ? 'none' : 'block';
document.getElementById('billing_yur_adress_field').style.display = this.checked ? 'none' : 'block';
document.getElementById('billing_bik_banka_field').style.display = this.checked ? 'none' : 'block';
document.getElementById('billing_rasch_schet_field').style.display = this.checked ? 'none' : 'block';
" />Физическое лицо</label></li>
<li><label><input id="chkl" title="Отметьте если Вы являетесь юридическим лицом" value="2" name = "level" type="radio" onchange="
document.getElementById('billing_name_company_field').style.display = this.checked ? 'block' : 'none';
document.getElementById('billing_inn_field').style.display = this.checked ? 'block' : 'none';
document.getElementById('billing_kpp_field').style.display = this.checked ? 'block' : 'none';
document.getElementById('billing_yur_adress_field').style.display = this.checked ? 'block' : 'none';
document.getElementById('billing_bik_banka_field').style.display = this.checked ? 'block' : 'none';
document.getElementById('billing_rasch_schet_field').style.display = this.checked ? 'block' : 'none';
" />Юридическое лицо</label></li>
</ul>
</div>