0 Replies Latest reply on Mar 14, 2011 10:53 PM by varun.nigam123

    Issue in Adobe e-form with indiscriminate display of warning image.

    varun.nigam123

      Hi,

         I have designed an e-form using Livecycle Designer.In this form there is a warning image (a small yellow triangle above every field) which is displayed, if the user enters incorrect data for that field, after saving the form.For this, I have called a standard function on presave event of the individual fields.This functionality is working fine.But the issue is suppose for any two fields if I enter incorrect data in second field and correct data in first field so after saving the form the warning image is displayed on the second field.Now if I interchange the values just for the first instance after saving the form the warning image is not getting displayed on the first field.If I make some changes in the form or even if I do nothing just click on a field and exit from it without entering any text and save the form the warning image is displayed.

      This defect has been reported from my testing team and I have to close it as soon as possible. Kindly look into this issue and help me in resolving it.

       

      Please find below the code for standard function:-

      function

       

      validateMixFields(field,imageField)

      {

       

      if (!((field.rawValue == null)||(field.rawValue == "")))

      {

      // Create a new Regular Expression Object.

       

      // Set the regular expression to look for fields in general form.

       

      var checkExpression = new RegExp("^[^<>=\"'`]*$");

      // Test the rawValue of the current object to see if it fits the general format

       

      var result = checkExpression.test(field.rawValue);

      // If it fits the general form

       

      if (result == true) {

       

      imageField.rawValue

      ="";

      imageField.access

      = "protected";

       

      // all is well.

       

      true; }

       

      else

       

      // fail the validation.

      {

       

      imageField.rawValue

      = global.imagefield;

      global.count

      ++;

      imageField.access

      = "protected";

      }

      }

       

      else

      {

      imageField.rawValue

      ="";

      imageField.access

      = "protected";

      }

      }

      ~