Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Validating MultiSelect - select (multiple) - fields

Validating MultiSelect - select (multiple) - fields

Does anyone have ISF that validates a "select (multiple)" field filled with values via Service Designer?  We're trying to keep users from submitting a request with "--Select Value(s)--" (the first value in the list) as one of their selections.

Thanks!

Charlie

Everyone's tags (1)
6 REPLIES
New Member

Validating MultiSelect - select (multiple) - fields

Personally I think that you don't need the "Select Values" entry on a select multiple field.  I think your help text covers how to use it.  It is important on a single select because the first entry is considered selected and usually you don't want the first entry in the list to act as a default value.  On a multi-select, none of the options are initially considered selected so the built in validation should work OK and remove the need for any custom ISF.

New Member

Validating MultiSelect - select (multiple) - fields

New Member

Validating MultiSelect - select (multiple) - fields

Validating MultiSelect - select (multiple) - fields

Hi James,

I was wondering if I may ask some questions on your code?  You mention you have your code in the onSubmit function - is that a common function that you're calling (ie, does this code exist only once in your ISF); and does it also work for Single Select Lists that are populated by rcFetch and Literal lists?

We have a validator for Fetch-populated lists in place which works very well but are trying to think of a Literal-list version!

Cheers,

Ant

New Member

Validating MultiSelect - select (multiple) - fields

There is actually slicker ISF to highlight a required field if dashes are select in a select (single):

function mandatoryDropDown (sFieldName, aMessage) {
document.getElementById(sFieldName).options[0].value = '';
serviceForm.sFieldName.addValidator('null', true, aMessage);
}

The problem with this is that you can only call it once in a form.  If you have multiple select (sigle) fields in a form, you would need to create more scripts to be able to use.  I would recommend creating 5

New Member

Validating MultiSelect - select (multiple) - fields

If you're using 2008 version, you can always build a rule and use the condition that if "Select" is in the field, set an alert, then stop submission and then set focus back to the selection.  This works great for us when we have a select single list.  Not sure if it would work the same way with select multiple, but seems like it would.

175
Views
0
Helpful
6
Replies
CreatePlease login to create content