Hi,
I'm trying to make a field required only if a user chooses a alternative on another field, something like exampel below:
field1: Type of the building
field2: House number
field1, type of the building has 2 alternatives: 1-House 2-Apartment
I the field2(House number) become required only if the user chooses alternative 1- House on the field1
I have this scrpit which I was testing on javasc on load (events):
var ctrl1 = Runner.getControl(pageid, 'Type of the building');
var ctrl2 = Runner.getControl(pageid, 'House number');
if (ctrl1.getValue()=='House'){
ctrl2.addValidation("IsRequired");
}
But it gives no effect!
Can someone please help me with this, thanks.