Script - Changing Submission Format

Avatar

Avatar
Validate 1
Level 3
JoshDBoyle-DVzR
Level 3

Likes

2 likes

Total Posts

94 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 3
JoshDBoyle-DVzR
Level 3

Likes

2 likes

Total Posts

94 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
JoshDBoyle-DVzR
Level 3

10-11-2008

All



I need a line of Javascript of FormCalc code that changes the form's submission type from XDP to PDF. I have arrived at the following but am unsure if it is correct:



$.#event.#submit.format = "PDF";



Any ideas?

Replies

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

11-11-2008

Here is the javascript command assuming that your button is called EmailSubmitButton1:



EmailSubmitButton1.event__click.submit.format = "pdf";



Note that the parameter pdf is case sensitive and must be lowercase.

Avatar

11-11-2008

Alternatively you can use the following format:

xfa.resolveNode("Button1").nodes.item(0).nodes.item(0).setAttribute("pdf","format");

Avatar

Avatar
Validate 1
Level 3
JoshDBoyle-DVzR
Level 3

Likes

2 likes

Total Posts

94 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 3
JoshDBoyle-DVzR
Level 3

Likes

2 likes

Total Posts

94 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
JoshDBoyle-DVzR
Level 3

11-11-2008

Hmmm I believe both of the above work but my problem still persists. Let me explain further:



I am using an XFA Form throughout my workflow but prior to the final user step (a step where a Digital Signature will be applied) I covert the XFA to a Document Form. This Document Form is then what I present to the user at the final workflow step.



Since it is a Document Form, my Workspace button of "Complete" isn't working and I was told that if I changed the submission type of the form's submit button from "XDP" to "pdf" then it might.



Any ideas?

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

11-11-2008

Ah now I understand what is happening ..... doid you drop the process fields onto your form? If you did, then it the Hierarchy view you can click on the FSSSUBMIT_ button. Then in the Object palette, click on the Submit tab. In the Submit As dropdown select PDF. Save your form and try it again.

Avatar

Avatar
Validate 1
Level 3
JoshDBoyle-DVzR
Level 3

Likes

2 likes

Total Posts

94 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 3
JoshDBoyle-DVzR
Level 3

Likes

2 likes

Total Posts

94 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
JoshDBoyle-DVzR
Level 3

11-11-2008

Well, I believe I need the submission to be XDP throughout the workflow and only have it change to PDF prior to the final user step where the form gets Digitally Signed - thus my request for the code to do so dynamically.



I tried applying the code you offered on the FSSUBMIT_ button as opposed to my actual Button1 I put on the form but to no avail. When I click the "Complete" button in Workspace, the form just sits there.

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

11-11-2008

What happens if you hit your button on the form? What if you take your button away?

Avatar

Avatar
Validate 1
Level 3
JoshDBoyle-DVzR
Level 3

Likes

2 likes

Total Posts

94 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 3
JoshDBoyle-DVzR
Level 3

Likes

2 likes

Total Posts

94 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
JoshDBoyle-DVzR
Level 3

11-11-2008

When I try to click on either my generic submit button (Button1) or on the FSSUBMIT_ button, I get a message box displayed that simply says "Submit cancelled".



The form doesn't go anywhere.

Avatar

Avatar
Boost 1
Level 2
Luigi_247_365
Level 2

Likes

2 likes

Total Posts

26 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 2
Luigi_247_365
Level 2

Likes

2 likes

Total Posts

26 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
Luigi_247_365
Level 2

12-11-2008

"Submit cancelled" - you may have added your own scripting to the process fields default scripting, that is causing an issue.



coming back to your original question - try the following below:



Javascript



PDF Submission

event__click.submit.textEncoding="UTF-16";

event__click.submit.xdpContent="pdf datasets xfdf";

event__click.submit.format="pdf";



XDP Submission

event__click.submit.textEncoding="UTF-16";

event__click.submit.xdpContent="pdf datasets xfdf";

event__click.submit.format="";



hope it helps.

Avatar

Avatar
Validate 1
Level 3
JoshDBoyle-DVzR
Level 3

Likes

2 likes

Total Posts

94 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 3
JoshDBoyle-DVzR
Level 3

Likes

2 likes

Total Posts

94 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
JoshDBoyle-DVzR
Level 3

12-11-2008

No dice 😞



Let me propose a more basic question: How do you submit a "Document Form" variable within Workspace?