This topic is locked
[SOLVED]

 3 textbox validations java onload

11/15/2012 9:05:27 AM
PHPRunner General questions
I
Ivan van Oosterhout author

Hi Christian,
In this code PAL must be filled in at all times, but can i set it that it doesnt matter which field you fill in aslong as you fill minimal 1 field and it cannot be 0...
var ctrlPAL = Runner.getControl(pageid,'PAL');

var ctrlCTN = Runner.getControl(pageid,'CTN');

var ctrlGOH = Runner.getControl(pageid,'GOH');
ctrlPAL.addValidation('IsRequired');
this.on('beforeSave', function(formObj, fieldControlsArr, pageObj){

if(ctrlPAL.getValue() == '' && ctrlCTN.getValue() == '' && ctrlGOH.getValue() == '')

{

ctrlPAL.validate();

}

else

{

ctrlPAL.removeValidation('IsRequired');

}

});

C
cgphp 11/15/2012

What is your request?

I
Ivan van Oosterhout author 11/16/2012

My Request is that:
You have to fill minumum 1 textfield, but we dont know which one.
But 1 textbox has to be filled with a value Greater then 0
Now the situation is that at least you have to fillin a value in PAL because the vallidation is on that field.
The validation needs to be on all 3 fields, with argument.
Fill in a least 1 value, in it doenst matter which box and greater then 0