Expand my Community achievements bar.

Add a button to check required fields are completed

Avatar

Former Community Member

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

4 Replies

Avatar

Former Community Member

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.

Avatar

Former Community Member

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

Avatar

Former Community Member

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.

Avatar

Former Community Member

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