Two questions -
1. I render an xdp form as HTML. When in workspace, is there a way to invoke the complete button from the form?
2. I see a save button in workspace when rendering xdp as html. Is there a way to remove the save button?
1. When a form design does not contain a submit button, Workspace disables the Complete button, and users cannot submit the form. When a form design contains a submit button, Workspace hides the submit button and enables the Workspace Complete button. You can use the complete button in place of actual submit button.
2. You can disable/hide the save button in HTML Workspace after modifying /libs/ws/js/runtime/templates/taskdetails.html and /libs/ws/js/runtime/templates/startprocess.html, as this is the part of customizing Workspace.
For your answer to 1. This is not the behavior I am seeing when xdp is rendered as HTML in workspace. The complete button has no link to any buttons on the form and all it can be used for is to submit. It does validations if xfa.host.validationsEnabled is set to true, but other than that, it executes no button in the form. If you want I can show this to you in a meeting session and you can clarify what you are saying. Also, the link that you have provided applies to when you are submitting the form as PDF, not when the form is XDP rendered as HTML. Which takes me back to my original question, how can I invoke the complete button in workspace from my form when I it is an xdp rendered as html.
For 2. I'll check out the link you provided and see if I can follow the directions. Thanks.
My form has a lot of links to internal webservices. Is there a way I can send you the form separately instead of posting on a public forum?
@RaviMRam , As we observed in the meeting, it is not working for you because you are using multiple submit buttons in your form. A form should only have one submit button. Also, you should put all the validation logics in the validate event.
I created a small sample application to see if the presubmit event works and it doesn't for me. Can we do another session sometime next week and you can tell me what I am missing?
It's because there are still two issues in your form:
1. You are executing the validation script in calculate event instead of Validate event of the form.
2. execValidate() returns empty. Why you are checking its return value as below?
if ( MainForm.execValidate() == true )
Can you tell me then how to code the following login in the preSubmit event of the submit button. We can use my test form as the guinea pig.
Validate the form (for required fields etc.)
if validation succesful
Make a webservice call
if webservice call successful
I have done the same in this form. I have used data connection in Designer to call the WSDL which adds the input A and B.
I tried out your form here and it submits without doing any validations. Did you test out the form at your end? Maybe, I am missing something.
Also, are you testing out the form rendering it as html and submitting outside of workspace?