Expand my Community achievements bar.

SOLVED

AEM Forms Tabbed Enrollment Template Bug(s)?

Avatar

Level 2

Hi:

I posted a few days ago about another issue I was having with an adaptive form I'm working on. Thanks to the feedback received I was able to resolve that issue so thank you for that!

I have a few other issues which I believe may be issues associated with the template itself (as opposed to my form built on top of the template). I say this because I have 2 demos based on the same template and I'm observing the same issues on both of my forms and I have observed the same behavior on other adaptive forms I have quickly thrown together to see if they exhibit the same issues

Here's some back story so you have an idea of the context for these issues:

  • adaptive form demo being built on AEM6 SP1, AEM Forms SP1, AEM Forms FP1.
  • XFA based adaptive form.
  • form template located at /apps/geometrixx-gov/components/page/tabbed-enrollment-page copied into a new project.
  • I've created 2 virtually identical form demo's so far, both based on the same XFA form.
  • Demo 1 was created within the Geometrixx web site and was my initial attempt at the demo.
  • Demo 2 was created on a new AEM site I created which is based on a copy of the potential client's actual web site which I imported into AEM using the AEM Site Importer tool.
  • both demos are created using the same above mentioned AEM Forms template, although demo 2 is of course using the copied instance of the form template.
  • Adaptive form has a repeating panel section which was created by dragging and dropping the repeating section in the XFA form onto the adaptive form template (Minimum count property under the Repeat Settings tab of the panel is set to 4).
  • Parent panel which holds the repeating sections has its "Layout of items" property set to "Layout for accordion design".
  • adaptive form has required fields (set at the XFA level).
  • adaptive form has an E-Sign component on it configured to use Echosign to render the XFA form and have it signed.
  • XFA form is bound by a schema so that data entered on the adaptive form can be populated in the Echosign rendered XFA form.

Here are my issues:

1. Caption of repeating panel sections are as follows:

1st panel's caption - PanelName

2nd panel's caption - PanelName 1

3rd panel's caption - PanelName 2

4th panel's caption - PanelName 3

2. I've noticed the naming (ie numbering) of additional repeating panels I add can be mixed up. If you click "+" on the PanelName 3 row you get a PanelName 4 row below it. If you click on the PanelName 3 row again, you end up with two PanelName 4 rows. To keep the numbers incrementing properly you have to always click the "+" sign on the last row. Conversely, if you remove any rows before the last row the numbers get out of sync (ie they don't renumber automatically).

3. If I try to submit the form before all required fields are complete, when I then navigate to the E-Sign component I see a message box which says "Please esign the form". Once I dismiss this dialog box I can no longer get the E-Sign component to render the XFA form inside it. Navigating back and forth between other tabs on the form and the tab with the E-Sign component does not resolve the issue. Similarly, if I do fill out all required fields and then try to submit prior to signing the form with Echosign I get the same message box in the E-Sign component. Dismissing the message box causes the XFA form to disappear and the XFA form will not render anymore. Prior to attempting a submit I can navigate to the E-Sign component numerous times and each time it renders the XFA form, always reflecting the current data entered on the adaptive form.

So, just wondering if these are known issues (ie bugs)? Has anyone else encountered them? Are there fixes or workarounds?

If the panel naming is a bug I'm not opposed to trying to fix it myself for the purpose of my demo but I'm quite new to AEM and so far have not had any success identifying where in the code this is happening.

Hope someone can help. Thanks in advance.

Dale

1 Accepted Solution

Avatar

Correct answer by
Level 3

The caption (as you call it, we call it panel summary) that you see in the Repeatable Panel is actually controlled by the summary expression on a panel. In the edit dialog of the repeatable panel you can write an expression in the Summary Expression field (The field is highlighted in the Image).

[img]repeat.png[/img]

If you don't provide any expression, this is the expected behaviour. If you provide a summary expression, it will be executed every time you add or remove a instance of the panel using the plus(+) and cross (X) buttons. As mentioned in the image if you write the following in the summary expression

this.title + " " + this.index

you will get the expected behavior. Here this represents the panel on which the expression is written, title is the title that you provide in the edit dialog, and index is the number of siblings a panel has before it. 

You can also use field values in the expression as well, as an example if you have a Field "InsuranceNumber" and you want to show that in the panel summary you can write the expression

InsuranceNumber.value

some other examples of summary expression

this.name + " " + this.index
this.title + " " + this.instanceIndex // instanceIndex is the number of repeatable // siblings the panel has before itself. 

Some useful links regarding Expressions, the first one [1] provides information regarding the different expressions and scripts that you can use and [2] lists out the properties of different fields/panels that you can use in those expressions and scripts. Please keep in mind that the properties list [2] is work in progress and if you need any more clarification please post a message in the forum.

For the echo sign issue, we need to look at the issue and then only we can comment on that.

[1] https://helpx.adobe.com/aem-forms/6/adaptive-form-expressions.html

[2] https://helpx.adobe.com/aem-forms/6/javascript-api/index.html

Hope it helps.

 

Happy to Help

Varun

View solution in original post

5 Replies

Avatar

Correct answer by
Level 3

The caption (as you call it, we call it panel summary) that you see in the Repeatable Panel is actually controlled by the summary expression on a panel. In the edit dialog of the repeatable panel you can write an expression in the Summary Expression field (The field is highlighted in the Image).

[img]repeat.png[/img]

If you don't provide any expression, this is the expected behaviour. If you provide a summary expression, it will be executed every time you add or remove a instance of the panel using the plus(+) and cross (X) buttons. As mentioned in the image if you write the following in the summary expression

this.title + " " + this.index

you will get the expected behavior. Here this represents the panel on which the expression is written, title is the title that you provide in the edit dialog, and index is the number of siblings a panel has before it. 

You can also use field values in the expression as well, as an example if you have a Field "InsuranceNumber" and you want to show that in the panel summary you can write the expression

InsuranceNumber.value

some other examples of summary expression

this.name + " " + this.index
this.title + " " + this.instanceIndex // instanceIndex is the number of repeatable // siblings the panel has before itself. 

Some useful links regarding Expressions, the first one [1] provides information regarding the different expressions and scripts that you can use and [2] lists out the properties of different fields/panels that you can use in those expressions and scripts. Please keep in mind that the properties list [2] is work in progress and if you need any more clarification please post a message in the forum.

For the echo sign issue, we need to look at the issue and then only we can comment on that.

[1] https://helpx.adobe.com/aem-forms/6/adaptive-form-expressions.html

[2] https://helpx.adobe.com/aem-forms/6/javascript-api/index.html

Hope it helps.

 

Happy to Help

Varun

Avatar

Employee

For #1 & #2, like Varun mentioned, it's highly recommended to use Summary expression which is primarily built for this purpose and gives you a lot of control how title should appear.

For #3, looks like in E-Sign component that you dropped on form, has Scribble as configured service instead of Echosign, can you double check that.

Avatar

Level 2

Thanks Varun & Deepak. I had looked over these links before and tried applying some of what is covered there but I couldn't seem to quite accomplish what I was trying to do. I just used your example and it worked perfectly, with a slight mod since index is 0 based :-) I will redouble my efforts to look at this resource closer again.

Please forgive my incorrect terminology, still very new to this whole environment, having come here from LiveCycle.

Re your note Deepak, I actually have 2 E-Sign components on that panel, the top one is a simple scribble signature and the one below it is configured for Echosign. This is simply for demo purposes.

I can appreciate it would be hard to comment on my Echosign issue. This particular demo is available on a publicly accessible server, although password protected. If it is acceptable, I would be willing to share the access details with you by sending you a private message so you could take a look.

Thanks

Dale

Avatar

Level 3

Also you can check the logs in your browser in xfa based forms and see if there is any error

1. Navigate to http://<server>:<port>/system/console/configMgr

2. Search for Html Library manager and click edit (pencil icon next to library manager)

3. Select the check box which says Debug Console

4. In the next field (which says Debug Init Script) select add the script 

window.AF_log_config="a7-b7-c7-d7". 

5. The final value in the field should be 

window.CQ_initial_log_level='INFO';window.AF_log_config="a7-b7-c7-d7"

To understand what is a7-b7-c7 and what different values you can give to control log messages, please look at the link [1]. The link doesn't says anything about the parameter d7, but it stands for category: Adaptive Form and loggging level as All.

If you see any error logs please send them across

Varun Dua

[1] https://helpx.adobe.com/livecycle/help/mobile-forms/logs-mobile-forms.html

Avatar

Level 2

Hi Varun:

I carried out the steps you detailed to enable logging. The Firebug console created by this logging does not seem to want to allow me to copy the lines I need to copy and sometimes the lines are truncated unless you hover over them with a mouse. What I'll do instead instead of attaching a log file is provide a summary below of what I am observing:

BEFORE clicking the Submit button:

When I click on the panel with the E-Sign component I see the following calls just prior to the XFA rendering inside the E-Sign component

POST /content/forms/af/cbsa/CBSA4/jcr:content/guideContainer.af.internalsubmit.jsp    200 OK     920ms    
POST /content/forms/af/cbsa/CBSA4/jcr:content/guideCont...l/items/panel1392199234944/items/esign.default.js   200 OK        6108ms   

Until I navigate away from that panel I see this appear every few seconds
GET /content/forms/af/cbsa/CBSA4/jcr:content/guideCont...esign.issigned.jsp?uuid=1f1ae5-3603-4a9e-af7a-6403ae8701a8&_=1429106836804

When I navigate back to the E-Sign component panel I see the same thing again as just detailed. I can do this as often as desired and the XFA form re-renders each time inside the E-Sign component.

AFTER clicking the submit button:

A number of validate events occur for the various required fields as well as this entry again

GET /content/forms/af/cbsa/CBSA4/jcr:content/guideCont...esign.issigned.jsp?uuid=1f1ae5-3603-4a9e-af7a-6403ae8701a8&_=1429106836804

Now when I navigate back to the E-Sign component I do not see any script activity. Dismissing the "please esign the form" dialog of the E-Sign component generates no script activity.

Even if I complete all required fields on the form, but do not sign the form, once I click the submit button the XFA form disappears and I cannot get the form to re-render. There is no further script activity, even this polling script

GET /content/forms/af/cbsa/CBSA4/jcr:content/guideCont...esign.issigned.jsp?uuid=1f1ae5-3603-4a9e-af7a-6403ae8701a8&_=1429106836804

which appears to be checking whether the form has been signed yet also stops executing

Filling in all required fields but not signing the form:

Here's another thing I noticed in this case. If I DO NOT navigate to the panel with the E-Sign component before clicking the submit button, the form WILL submit.

In this case the GET /content/forms/af/cbsa/CBSA4/jcr:content/guideCont...esign.issigned.jsp?uuid=1f1ae5-3603-4a9e-af7a-6403ae8701a8&_=1429106836804 script DOES NOT execute.

If I DO navigate to the panel with the E-Sign component before clicking the submit button, the form WILL NOT submit. The E-Sign component message box appears which says "please esign the form".

In this case of course the GET /content/forms/af/cbsa/CBSA4/jcr:content/guideCont...esign.issigned.jsp?uuid=1f1ae5-3603-4a9e-af7a-6403ae8701a8&_=1429106836804 script has already executed.

So, if I can possibly summarize all these scenarios, it seems that as soon as the E-Sign component message box appears which says "please esign the form", the XFA form will not render any more and there is then no way to submit the form because the GET /content/forms/af/cbsa/CBSA4/jcr:content/guideCont...esign.issigned.jsp?uuid=1f1ae5-3603-4a9e-af7a-6403ae8701a8&_=1429106836804 script runs and prevents the form from submitting. This script will not be run until the panel with the E-Sign component on it is clicked.

Hope all of this might provide a clue as to what's going on.

Thanks

Dale