Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

AEM repeatable subforms

Avatar

Avatar
Validate 1
Level 1
luciar76
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
luciar76
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
luciar76
Level 1

19-07-2017

Hello folks,

I'm working on the migration from ES2 to AEM and it seems that there are some problems mainly with the "Preview HTML5" TAB in AEM.

In designer AEM, when I tried to add a new instance of a repeatable subform (using addInstance function in a click event of a button), the new instance shows in preview PDF, it doesn't  in "Preview HTML5" .

It seems that is related to a refresh page problem.

Is there any idea that solve this issue?

Below my code:

form1.#subform[0].AddInstance.add::click - (JavaScript, both)

app.alert("count:"+_content.count);
_content.addInstance(true);
app.alert("count :"+_content.count);

(content is the name of the repeatable subform, containing a simple textField)

Thanks to everybody.

addInstane.PNG

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 5
Level 3
lesutton1
Level 3

Likes

9 likes

Total Posts

47 posts

Correct Reply

14 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 5
View profile

Avatar
Boost 5
Level 3
lesutton1
Level 3

Likes

9 likes

Total Posts

47 posts

Correct Reply

14 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 5
View profile
lesutton1
Level 3

19-07-2017

With the HTML5 version of the form, you need to have at least one instance of the subform that exists initially. Also, make your life much simpler by ensuring every element in your form has a proper name including subforms. You should have nothing that is "untitled". Keep in mind that in the browser "app" does not exist so you should try / catch that if you'd like to use it in web & pdf.

Answers (2)

Answers (2)

Avatar

Avatar
Boost 5
Level 3
lesutton1
Level 3

Likes

9 likes

Total Posts

47 posts

Correct Reply

14 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 5
View profile

Avatar
Boost 5
Level 3
lesutton1
Level 3

Likes

9 likes

Total Posts

47 posts

Correct Reply

14 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 5
View profile
lesutton1
Level 3

19-07-2017

One additional side note. If you are creating new forms, use Adaptive Forms.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

19-07-2017

Have you looked through all of the docs on this use case?

AEM 6.0 Forms Help | Creating forms with repeatable sections