Hi , I use this code to skip all the mandatory fields in the form .

Hi ,
I use this code to skip all the mandatory fields in the form .

function skipValidationFunc(field)
{
var componentDom = window.Build.util.getComponentContainer(field,window.FormDesigner.runtimeNamespace);
var configData = window.FormDesigner.getConfigData(componentDom.get(0));
configData.required = "false";
}

In the field we pass in the field id .

Now this code doesnt work if the validation is done using custom javascript . Is there a code to skip the validation for custom javascript validatons also .

Thanks
Sanghapriya Bose...

OriginalPostID-29298

OriginalPostID-29298

  Discussion posts and replies are publicly visible

Parents
  • This doesn't work with custom JS validation because you are only setting the "required" flag to false. The custom validation property is different form the "required" one. You can use the approach I describe here: forum.appian.com/.../5411 which is basically add the following to remove the custom JS validation and therefore make Appian skip it:

    .....
    configData.required = "false";

    var customValidation = configData.customValidations[0].value;
    configData.customValidations[0].value = null;
    window.Build.rebuild(configData.namespace, configData.key, true);
Reply
  • This doesn't work with custom JS validation because you are only setting the "required" flag to false. The custom validation property is different form the "required" one. You can use the approach I describe here: forum.appian.com/.../5411 which is basically add the following to remove the custom JS validation and therefore make Appian skip it:

    .....
    configData.required = "false";

    var customValidation = configData.customValidations[0].value;
    configData.customValidations[0].value = null;
    window.Build.rebuild(configData.namespace, configData.key, true);
Children
No Data