Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Form does not work

Avatar

Former Community Member
Hi



I use Adobe Livecycle Designer7.0 English and Acrobat7.0.8 Japanese. I made forms to upload to Workflow Server. One form I made does not work at all when the form is opened in the Form Manager.

It is strange that the PDF preview of the Designer works well.



1. Page Counter

In the master page of the form I set a page counter field from the custom library. In the preview it works well but when the form is opened from Form Manager it does not work. It looks like "Page ##/##".



2. Font is not shown

I put a button in the form. The font of the button is set to "MS UI Gothic", but when the form is opened from Form Manager the font of the button is "KozukaMincho".



3. JavaScript does not work

I wrote javascript to change the caption of fields like this.



----- form1.#subform[0].Button1::click - (Javascript, client)

FieldA.rawValue = "test";

FieldB.rawValue = "test2";



This script does not work too when the form is opened.



These issues are basic but I do not know where is wrong. Because no error message appears when I test the form in the PC.

Please advise about these issues.



Thanks,

Akira
4 Replies

Avatar

Level 6
Hello Akira,



Form Manager has an annoying habit of changing the root tag of your form to something else (I don't remember what). So, when you use a SOM expression that starts at the root like form1.whatever.whatever it fails. To find out how Form Manager is changing your data DOM, add a button to your form with this script on click:



xfa.host.messageBox(xfa.datasets.data.form1.Page1.saveXML("pretty"));



Look at the root tag. I would do this for you, but I don't have an environment with Form Manager handy at the moment.



Once you know what name FM gives your root tag, you can change the root tag of your form to that to avoid this sort of surprise. Another workaround is to never access objects using the full absolute SOM path from the root. Instead use a relative path like this.parent.parent.OtherSubform.whatever...



Please post a followup to tell me if that solved the problem, and tell me what FM changes the root tag to. It's bugging me now. Thanks.



Jared Langdon

J. Langdon Consulting

www.jlangdon.ca

Avatar

Former Community Member
Hi Jared,<br /><br />I am very glad to read your reply. <br />I added a button with the script you wrote in previous reply and found that Form Manager changed the root tag. <br /><br />The xsd file I define to the data is like this<br /><br />b <Message> //rootnode name <br /><br /> <Heade></Header><br /> <Contents><br /> <FieldA></FieldA><br /> ......<br /> </Contents><br /> <Footer><Footer><br /></Message><br /><br />So, I set the structure of the form like this.<br /><br />b <Message> //This is name of contents area<br /><br /> <Header></Header> //Subform name<br /> <Contents> //Subform name<br /> <FieldA></FieldA><br /> ......<br /> </Contents><br /> <Footer></Footer> // Subform name<br /></Message> <br /><br />But the saveXML script write out like this:<br /><br />b <fields><br /><br /> <Header></Header><br /> <Contents><br /> <FieldA></FieldA><br /> ......<br /> </Contents><br /> <Footer></Footer><br /></fields> <br /><br />So I changed all of the Javascript using relative path and I upload this form again to the FM, but this form does not work...<br />I am not sure that it must be the same name between the rootnode of the xsd file and the name of the contents area. <br /><br />Jared and all, would you let me know whatever you find about this issues.<br /><br />Best regards,<br />Akira

Avatar

Level 6
Is it possible for you to change your XSD to use a root tag of "fields" instead of "Message"? Then Form Manager's annoying habit of changing the root tag to "fields" won't have any impact on your form. Worth a try.



Jared Langdon

www.jlangdon.ca

Avatar

Former Community Member
Hi Jared,



Before I change the rootnode to "fields", I get some information about this.

This form does not contain the dynamic render tags so has become suddenly non-dynamic form. I hear that this is due to a bug in Adobe Workflow. To resolve this issue, it needs that once this form is saved as a dynamic PDF. After reopen, this form is saved as a xdp file.

I try the way above, and the form works well!

For someone who has troubled with like these issues, you can try this way to resolve.



Jared, I am grateful thanks for your reply. Reffering to your reply, I can check between the xsd file and the structure of the form. I will change so that the names of the rootnode are the same.



Regards,

Akira