I use this code to validate radio buttons to enable,disable and requiered certain others textbox, and nothing ( addValidation("IsRequired"); ) or (removeValidation("IsRequired");)dont work the validation persist or no enabled, i see my code generated in xxx_funtions.php and the line contain is that ctrlvalor.addValidation(\"IsRequired\"); for the javascritp i change this but dont work, please send examples or howto more extended for use javascript.
var tName = 'xxx';
var ctrlvalor = Runner.controls.ControlManager.getAt(xxx, 1, 'valor ');
var ctrlfecha1 = Runner.controls.ControlManager.getAt(xxx, 1, 'fecha1');
var ctrlfecha2 = Runner.controls.ControlManager.getAt(xxx, 1, 'fecha2');
ctrlvalor.on('click', function(e){
if (this.getValue() == 1 ){
ctrlfecha1.show();
ctrlfecha1.setEnabled();
ctrlfecha1.addValidation("IsRequired");
ctrlvalor.setfocus();
ctrlfecha2.show();
ctrlfecha2.setEnabled();
ctrlfecha2.addValidation("IsRequired");
ctrlfecha2.setfocus();
}else{
ctrlfecha1 .hide();
ctrlfecha1 .setDisabled();
ctrlfecha1 .setValue("");
ctrlfecha1 .removeValidation("IsRequired");
ctrlfecha2.hide();
ctrlfecha2.setDisabled();
ctrlfecha2.setValue("");
ctrlfecha2.removeValidation("IsRequired");
}
});
Thanks Adminstrator for the pacient
Virgilio Cane