Not Mandatory

nowitsvashu
Tera Guru

Hi 
I have one requirement. 
There is a Section on a form which has 4 true/false field.
The requirement is that user cannot submit the form until one field is true from that section.
Please don't suggest onSubmit Client script because due to some reasons we're bounded to use this.

 

 

1 ACCEPTED SOLUTION

Vishwa Pandya19
Mega Sage

Hello,

 

Try Before Insert BR.

if(current.checkbox1 == 'false' && current.checkbox2 == 'false' && current.checkbox3 == 'false' && current.checkbox4 == 'false'){
gs.addErrorMessage("You cannot insert the task. Need 1 checkbox to be true");  
current.setAbortAction(true);

}

 

 

If my answer helps you in any way please mark it as correct or helpful.

View solution in original post

1 REPLY 1

Vishwa Pandya19
Mega Sage

Hello,

 

Try Before Insert BR.

if(current.checkbox1 == 'false' && current.checkbox2 == 'false' && current.checkbox3 == 'false' && current.checkbox4 == 'false'){
gs.addErrorMessage("You cannot insert the task. Need 1 checkbox to be true");  
current.setAbortAction(true);

}

 

 

If my answer helps you in any way please mark it as correct or helpful.