4 Replies Latest reply on Aug 2, 2010 11:29 AM by kenneth83

    Add a button to check required fields are completed

    kenneth83 Level 1

      Hi there,

       

      I wonder if anyone could please help? I want to add a button to my form which users can click on to check that all fields that have been set as required have been filled in. I know you can add a submit by email button which works similar but as my workflow is slightly different I do not want it to automaticaly generate an email for submission.

       

      Any help much appreciated.

       

      Thanks,

      Ken

        • 1. Re: Add a button to check required fields are completed
          Jerry62712 Level 1

          You can add a generic button object at design time and then associate the validations with the click event.

           

          You might also want to force the button when the form is closed as the user might not click it.  If it is clean it just closes.  If it is not, your warnings will occur.

          • 2. Re: Add a button to check required fields are completed
            kenneth83 Level 1

            Hi there,

             

            Thanks for the reply. This sounds like what I am trying to achieve! Please could you explain how to do this? I should have mentioned previosuly that I'm new to livecycle, particulalry anything to do with scriptingc as I have not used this before!

             

            Thanks again,

             

            Ken

            • 3. Re: Add a button to check required fields are completed
              Jerry62712 Level 1

              While in LC Designer or Workbench and with the form open, press Shift-F12 to display the Object Library.  Scroll down it to the Standard section and pick the "Button" object.  Don't pick the "Print Button" or "Submit Button" that may appear before it.

               

              Drag it to your form.

               

              Above your form should be a drag down Script editing area.  Drag it down.

               

              Click the button.  Click the down arrow in the Script editing area.  Click the "Click" event.

               

              You should see this: form1.page1.Button1::click - (JavaScript, client)

               

              You may have FormCalc instead of JavaScript.  Use whichever one you like best.

               

              Enter the validations you want and save it.  Go to the form and click the Preview tab and check that it works.

              • 4. Re: Add a button to check required fields are completed
                kenneth83 Level 1

                Thanks for getting back to me so quickly. I've followed all the steps but am unsure how to enter / script the validations in Javascript/FormCalc. Would it be possible to explain?

                 

                Really appreaciate the help!

                 

                Ken