Use submit button to trigger validation and prompt to save instead of submit action

Avatar

Avatar

tarekahf

Avatar

tarekahf

tarekahf

05-05-2016

I want to add a Submit Button that will trigger all validation using the built-in feature. This will also work well with the "forms validation" setting done on the form properties. See snapshot below.

However, if the validation is successful, I want to prompt for the save dialogue box instead actually submitting the form using this line of code:

app.execMenuItem("SaveAs");

How is this possible?

928663_pastedImage_0.png

Tarek

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Magus069

MVP

Avatar

Magus069

MVP

Magus069
MVP

05-05-2016

Hi there,

to do so you only need to call execValidate function built-in your form using the following :

Hope this will help!

Answers (6)

Answers (6)

Avatar

Avatar

tarekahf

Avatar

tarekahf

tarekahf

23-06-2016

To avoid prompting the file name, you have the following options:

1. Use trust function (client-based solution). This requires configuration on the user end. It is acceptable solution if the number of users is small.

2. Use submit to server to save. You can submit to server using Java/Eclipse/Tomcat or ASP.NET/VS/IIS and you have to develop a server side program to retreive the input stream, extract the XML, and parse it to get the data and PDF in binary format. I have done both solution using Java and ASP.NET. This is the best solution, and it requires good knowledge about server based technologies. Click here to find related samples.

2. Use Workbench to develop a process to process submission. I some knowledge about this and developed a few processes to perform this function.

Tarek

Avatar

Avatar

tarekahf

Avatar

tarekahf

tarekahf

06-05-2016

Thanks .... the only thing I wanted to implement is to focus on the first field which has errors, which is supported by the form validation. However, I had to manually hard code the call to the function to set focus after the dialogue.

Tarek

Avatar

Avatar

sivamaddy

Avatar

sivamaddy

sivamaddy

23-06-2016

@tarekahf

I am unable to get the sample documents. Could you please share documents to (sivasankaran.ganesan@gmail.com).

Avatar

Avatar

Magus069

MVP

Avatar

Magus069

MVP

Magus069
MVP

23-06-2016

Hi there,

if what you want is to specify the filename and path within LiveCycle using JavaScript, unfortunately Adobe will prevent that. To do so I think you need to create a trusted function. This requires a js file to be installed on the computer's user within adobe's JavaScript folder installation.

Avatar

Avatar

sivamaddy

Avatar

sivamaddy

sivamaddy

23-06-2016

Guys,

It gives the popup. We have to manually mention the filename and select the path where we need to save.

Instead of this, will it automatically save the file into the folder. Where can i mention the filename and path in the code.

Avatar

Avatar

Magus069

MVP

Avatar

Magus069

MVP

Magus069
MVP

06-05-2016

If you'd like to customize your validation in a better way than to use Adobe validation, you can try this functionality for validating forms.

It can be used in any form and easy customization, I hope this can come in any help for you.

Validation / Reset Functions, easy to manipulate and to change Forms!!!!