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. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

addValidator for Required Fields

addValidator for Required Fields

We would like to be able to control the assignment of the field validation (required fields) based of a selection by the user on the order form.

I have been able to assign this to a field based off of a selection, however, I would also need to remove it if the selection changes.  This is where I am running into problems.  I can't seem to remove it once it's added.

Has anyone been successful in doing this?  I know I'm missing something here...

  • Intelligent Automation
Everyone's tags (1)
4 REPLIES
New Member

addValidator for Required Fields

This should work:

serviceForm.dictionaryName.fieldName.validators = ''

New Member

addValidator for Required Fields

Here's what I did:

function S1476_Coop_Modify_Question4_onClick () {
  rcDebugLoad("Entering Function S1476_Coop_Modify_Question4_onClick");
  var secOwner = gethtmlinputvalues ('Coop_Modify.Question4');
  if (Moment == 'ordering') {
   switch (secOwner) {
    case 'No':
     document.all['Coop_Modify.Question5.Row'].style.display = 'none';
     docum

New Member

addValidator for Required Fields

Ok, this one is hitting it over the head, but it should work:

Set the options[0].value of the field back to a non-null value, for example, "N/A", "not applicable", or the original "Please select" value, so the validator wouldn't apply.

Make the field non-mandatory.

New Member

addValidator for Required Fields

Hi Leslie,

You're right, that would work.  I certainly appreciate your feedback on this discussion.

I may try to write something that mimics the addValidator method, but add a switch that would turn it on and off.  We'll see if I have time to do that in the coming weeks.

Thanks!

290
Views
0
Helpful
4
Replies
This widget could not be displayed.