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

Repeating Subform

Avatar

Avatar
Level 1
raykohbard
Level 1

Likes

0 likes

Total Posts

12 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
raykohbard
Level 1

Likes

0 likes

Total Posts

12 posts

Correct Reply

0 solutions
View profile
raykohbard
Level 1

17-06-2015

Hi Everyone,

i have a normal text field and a Add Field button in my form. If someone enters information in the text field, how do i make it such that when they click the Add Field button, a new field is added (but with default the same information that was entered earlier), and they can choose to overwrite the information on the subsequent repeated filed?

Many thanks.

Ray

Accepted Solutions (0)

Answers (4)

Answers (4)

Avatar

Avatar
Level 1
raykohbard
Level 1

Likes

0 likes

Total Posts

12 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
raykohbard
Level 1

Likes

0 likes

Total Posts

12 posts

Correct Reply

0 solutions
View profile
raykohbard
Level 1

26-06-2015

Hi jasotastic81

thanks for your advise, i am still testing out the above.

However i have some new questions on repeating subforms, i believe you are an expert in this field and i wonder if i reach you through your personal email address? I would like to send a form to ask you for some advise if you dont mind!

Ray

Avatar

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
Level 4

23-06-2015

It should be in the click event for your button. Remember, you'll need to change the object names in the script to match what you've got in your form. Also, that first line "btnAdd::click" was just to let you know what event it should be in.

Avatar

Avatar
Level 1
raykohbard
Level 1

Likes

0 likes

Total Posts

12 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
raykohbard
Level 1

Likes

0 likes

Total Posts

12 posts

Correct Reply

0 solutions
View profile
raykohbard
Level 1

23-06-2015

Hi jasotastic81,

thanks a lot for your reply. Sorry i am not good with programming skills, which part should i add this script?

Thanks!

Avatar

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
Level 4

19-06-2015

Presuming that your subform and text field are called sfInfo and tfInfo, respectively, here's my solution to this problem:


btnAdd::click


sfInfo.instanceManager.addInstance();


xfa.resolveNode("sfInfo["+ (sfInfo.instanceManager.count-1) +"].tfInfo").rawValue = xfa.resolveNode("sfInfo["+ (sfInfo.instanceManager.count-2) +"].tfInfo").rawValue;