7 Replies Latest reply on Jan 18, 2010 6:26 AM by pguerett

    Missing Validation

    Sarika_M

      Hi All,

      Actually I have created one form along with validations in adobe livecycle. but when I invoke it using web services, validation for two fields is missing...

      e.g. - I am asking the person to enter the gender, if person is male then I am disabling pregnancy test module. And if person is female then I am asking information about pregnancy test. But in the invoked form Male and Female fields are not editable.

      Please tell me the reason for this? Did anybody face this problem before?

      Regards,
      Sarika

        • 1. Re: Missing Validation
          pguerett Level 6

          By default validations only fire when a submit is done. A Web Service call is not considered a submit. You would have to execute the validations yourself through script in this case.

           

          Paul

          • 2. Re: Missing Validation
            Sarika_M Level 1

            Hi Paul,

             

            We have designed a form in Adobe Live Cycle Designer and written JavaScript to the PDF form fields while designing it. We have also created a process in Adobe Live Cycle for invoking it through WebServices from our application. However, when we invoke it some of the validations are not working in the PDF form.

             

            As per our understanding, a static form is invoked. This is because when we open that invoked form in Adobe Live Cycle Designer and save it as Acrobat 8 (Dynamic) XML Form then all the validations are working properly. I am not getting, is there any problem with Validation Scripts or while invoking the form. Because Date Validations for date field (Date should not be a future date) is working fine.

             

            Please let me know, if the information I have provided is not sufficient to understand the problem.

             

             

             

             

            • 3. Re: Missing Validation
              pguerett Level 6

              The validations that you have coded are they on the validate event? If not where did you code these validations?

               

              Paul

              • 4. Re: Missing Validation
                Sarika_M Level 1

                Paul,

                 

                Thank you very much for your customary prompt help.

                I am done with that validation missing problem. I don’t know the reason for that problem, but I have redesigned some fields and the problem has gone.

                 

                But I am also facing one more problem. I am adding/deleting rows dynamically using + (Plus) & - (Minus) Sign. for this I have used subforms both Positioned and Flowed.

                 

                I have added constraints as user can add max. 10 fields using + button and minimum 1 row should be there on the form. Validations are working properly and alerts/warning are getting generated but I am not able to see the added rows on the PDF Form.

                 

                Please help me. if problem is not clear let me know.

                 

                Following is the script :

                 

                Script on + button :

                 

                // MED_HIST_SUB1.MED_HIST_SUB2.addInstance(true);

                 

                var nSubLength = MED_HIST_SUB1.nodes.length;

                var nNumSub = 0;

                for (var nCount = 0; nCount < nSubLength; nCount ++)

                {

                            if (MED_HIST_SUB1.nodes.item(nCount).className == "subform")

                            {

                                        nNumSub = nNumSub + 1;

                            }

                }

                if (nNumSub == 10)

                {

                            xfa.host.messageBox("The maximum allowable number of subforms is 10. You cannot add any more subforms.", "Warning", 3);

                }

                else

                {          

                            MED_HIST_SUB1. MED_HIST_SUB2.instanceManager.addInstance(1);

                }

                 

                 

                Script on - Button :

                 

                var nNumSub = 0;

                var nSubLength = MED_HIST_SUB1.nodes.length;

                for (var nCount = 0; nCount < nSubLength; nCount ++)

                {

                            if (MED_HIST_SUB1.nodes.item(nCount).className == "subform")

                            {

                                        nNumSub = nNumSub + 1;

                            }

                }

                nNumSub = nNumSub - 1;

                if (nNumSub < 1)

                {

                            xfa.host.messageBox("The minimum allowable number of subforms is 1. You cannot remove any more subforms.", "Warning", 3);

                }

                else

                {

                            MED_HIST_SUB1. MED_HIST_SUB2.instanceManager.removeInstance(nNumSub);

                }

                 

                 

                • 5. Re: Missing Validation
                  pguerett Level 6

                  Is the form saved as a dynamic form? If it is then can you post the form so I can have a look?

                   

                  Paul

                  • 6. Re: Missing Validation
                    Sarika_M Level 1

                    Actually, when I see to the properties of invoked PDF form, it shows Acrobat 6 (Static) PDF Form.

                    I am not getting a dynamic form as output.

                     

                    Paul, Could you plz provide me your mail id? So that, I can email the form to you.

                     

                    Sarika