Hello All,
I have drop down for with Yes,No. Next is a text box.
Text box should be required only if "Yes" is selected from the drop down.
I have used class="cf_inputbox required validate-digits" on next text box.
I am using a function on onchange of drop down to show or hide text box.
I am able to hide/show (also removing/adding class to elements for validations) text box.
But when I submit the form nothing happens as Live validations are still forces to fill the text box. They are adding automatically the class " LV_invalid_field"
How can I disable the live validations on the text box if NO is selected from the drop down.
I am using this function on onchange
I have drop down for with Yes,No. Next is a text box.
Text box should be required only if "Yes" is selected from the drop down.
I have used class="cf_inputbox required validate-digits" on next text box.
I am using a function on onchange of drop down to show or hide text box.
I am able to hide/show (also removing/adding class to elements for validations) text box.
But when I submit the form nothing happens as Live validations are still forces to fill the text box. They are adding automatically the class " LV_invalid_field"
How can I disable the live validations on the text box if NO is selected from the drop down.
I am using this function on onchange
function heloc_chk()
{
var heloc = document.getElementById("text_18");
if(document.getElementById("select_17").value == 0)
{
heloc.className='';
document.getElementById("heloc_div").style.display='none';
}
if(document.getElementById("select_17").value == 1)
{
heloc.className='cf_inputbox required validate-digits';
document.getElementById("heloc_div").style.display='';
}
}