Hi Guys,
On my add page I have a have a field call "qualifications"
This field is set to a lookup wizard of the qualifications table
The lookup wizard is set to a checkbox list, which also allows multiple selection of values.
I have added a javascript onLoad event to show/hide a field called "qualifications_Other" if "Other" is selected from the "qualifications" lookup wizard checkbox list control.
Here is the javascript onLoad code:
//Start.............................................................................
var ctrlIvcX841 = Runner.getControl(pageid, 'qualifications');
var ctrlIvcX841T = Runner.getControl(pageid, 'qualifications_Other');
pageObj.hideField("qualifications_Other");
ctrlIvcX841.on('change', function(e) {
if (this.getValue()!= "Other"){
pageObj.showField("qualifications_Other");
ctrlIvcX841T.addValidation("IsRequired");
}
else {
pageObj.hideField("qualifications_Other");
ctrlIvcX841T.removeValidation("IsRequired");
ctrlIvcX841T.setValue('');
}
});
//End.............................................................................
This event works well if the exact value ONLY is selected by the user,
However because the user can select multiple values, if a user selects more than one value from the "qualifications" lookup wizard checkbox list control, the show/hide process is broken.
I was just wondering if possible can I change the operator or something to show or hide the field even if MULTIPLE values ("Other" being the trigger value) are selected in the"qualifications" lookup wizard checkbox list control?
i.e. if (this.getValue()== "Other"){
Many thanks