I've completed my first form but now want to format the xml that's generated.
Whilst I work for a big Company, I don't think they'll stretch to purchasing the Reader Extensions Module so I can output as PDF. Also there will be more than 500 users completing the form, so I can't just extend the rights using Adobe Acrobat.
Therefore, I'd like to transform the xml created using xsl (as I have knowledge in this area) - I'd like the transformation to occur when the form is submitted via email so that a 'friendly' attachment is added to the email and not the xml output.
Any ideas on this one?
Views
Replies
Total Likes
Is your issue, while submitting, send a "PDF" in the email attachment rather than XML file?
If you want to send PDF, you can change the option in the Submit button properties to "PDF".
Otherwise let me know..
Thanks
Srini
Views
Replies
Total Likes
Thanks Srini but I've tried that already.
On the mouseDown event of my 'Confirm' button I've tried the following:
var
oSubmit = this.resolveNode("$..#submit");
var cToAddr = "myemailaddress";
var cSubLine = "Subject";
var cBody = "Body";
var
cEmailURL = "mailto:" + cToAddr + "?";
cEmailURL
+= "subject=" + encodeURI(cSubLine) + "&body=" + encodeURI(cBody);
oSubmit.target = cEmailURL;
oSubmit.format = pdf;
But it still gets output as xml - looking through all the forums, this is again because you need to have the Reader Extensions, etc.
Views
Replies
Total Likes
Here is a sample that can work for you..I have not applied Reader Extensions to it..So it may be of helpful to you..
https://acrobat.com/#d=CK4QgXn38l49bzQlhWtKSA
Let me know if you still have issues..
Thanks
Srini
Thanks again Srini - I'll try it out and let you know.
Views
Replies
Total Likes
Srini - I added the code you sent through to me but when I click the button I get a pop-up window with 'Submit cancelled' in it.
Any ideas to this one? Is it down to a specific version of Adobe Reader?
Thanks,
Views
Replies
Total Likes
Views
Replies
Total Likes
Done
Views
Replies
Total Likes
First thing is, the fonts did not work in my system.. So I can not really understand where the email address fields are..
Few things:
1) You have used an Email submit button and tried to place the code in the MouseDown event.
You need to change this button to "Regular Type Button". and place the code in the Click event to work.
2) I placed a sample button and put in my code for your reference.. This is working fine..You can check the below sample.
https://acrobat.com/#d=tQa4E*8aA*mJq6aijSHuDQ
3) You can do the same way for your form..
4) If you have Acrobat software, you can enable JavaScript debugger which can give you the specific error message rather than Submit cancelled. If you do not, then you need to put some messageBox statements and check..
Thanks
Srini
Views
Replies
Total Likes
Srini,
I tested the example you originally gave me and I was getting the exact same error - a pop-up window with 'Submit cancelled' in it which is why I wondered if it was down to the version of Reader.
Also, the example you gave had the event firing in the preSubmit event - in the form I sent to you I had done the same thing. The button you were looking at was my original Confirm button, but my form also included the regular button you used - called 'Confirm New' in my form. This was the one I tested.
Thanks for looking though and for all your help,
Views
Replies
Total Likes
I've now added a regular button to my form, set it as a submit button and then stuck my original code onto the preSubmit event - my original code is like this:
oSubmit = this.resolveNode("$..#submit");
var
var cToAddr = "myemailaddress";
var cSubLine = "Subject";
var cBody = "Body";
cEmailURL = "mailto:" + cToAddr + "?"; += "subject=" + encodeURI(cSubLine) + "&body=" + encodeURI(cBody);
var
cEmailURL
oSubmit.target = cEmailURL;
oSubmit.format = pdf;
Now when my email is generated it contains an XDP file rather than an XML file! But what can I do with this XDP file? When I try to open it it says it's associated to a .PDF file that can't be found.
Views
Replies
Total Likes
An XDP file is an xml file. The file extension XDP is associated with Designer. You can open it in Notepad or any other editor .......you simply cannot double click it and have the appropriate application launch (because of the association).
Paul
Views
Replies
Total Likes
Thanks Paul.
Basically I'm nowhere further along than I originally was!
I'll revert to my original question, does anyone know how (or even if it's possible) to convert the xml generated from a LiveCycle form, i.e. the xml that gets sent out via email, by using XSLT? I basically want the output of the form to be as user-friendly as possible.
Views
Replies
Total Likes
You can control the structure of your xml that is produced by creating a sample data file (exactly the way you want it) and importing that
data file into the Data Conenction. Then you can bind the fields that you created to the nodes in the sample data file. Now when a
data file is produced it will follow your sample. Or if you want to build a schema to represent the data structure you can do that to.
Make sense?
paul
Thanks again Paul.
That does make sense, but I have to admit that sending any sort of xml to users that are not technically-minded was a last resort (not meant to be condescending).
However, sticking a schema against my output looks like my only option now.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies