Hi,
is there a way i can change the required fields at runtime?
eg. I have a checkbox and when it's value is on I want to have different fields as required than when it is off.
Up to now I have in the onload event of my table
var tName = 'churchcalendar';
var ctrlbMoveable = Runner.controls.ControlManager.getAt(tName, pageid, 'bMoveable');
var ctrliDays = Runner.controls.ControlManager.getAt(tName, pageid, 'iDays');
var ctrliMonth = Runner.controls.ControlManager.getAt(tName, pageid, 'iMonth');
var ctrliDay = Runner.controls.ControlManager.getAt(tName, pageid, 'iDay');
if (ctrlbMoveable.getValue() == 'on'){
ctrliDays.setEnabled();
ctrliMonth.setValue('');
ctrliMonth.setDisabled();
ctrliDay.setDisabled();
ctrliDay.setValue('');
}else{
ctrliDays.setValue('');
ctrliDays.setDisabled();
ctrliMonth.setEnabled();
ctrliDay.setEnabled();
}
ctrlbMoveable.on('change', function(e){
if (this.getValue() == 'on'){
ctrliDays.setEnabled();
ctrliMonth.setValue('');
ctrliMonth.setDisabled();
ctrliDay.setValue('');
ctrliDay.setDisabled();
}else{
ctrliDays.setValue('');
ctrliDays.setDisabled();
ctrliMonth.setEnabled();
ctrliDay.setEnabled();
}
});