Hi,
I want a field to be shown/hidden and validated depending on a value of a certain dropdown.
I am able to hide/show the field but the validation would not work.
I have added this code in my load JS event. Have i missed something?
I want a field to be shown/hidden and validated depending on a value of a certain dropdown.
I am able to hide/show the field but the validation would not work.
I have added this code in my load JS event. Have i missed something?
window.addEvent('domready', function() {
$('product_interest').addEvent('change', function() {
if($('product_interest').value == 'Loans'){
$('loanspacer').setStyle('display', '');
$('loanrow').setStyle('display', '');
$('comments').addClass("validate['required']");
formCheck.register($('comments'));
}
});
});