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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

rearrange repeating subforms in a complicated form

Avatar

Level 4

My subform situation is a little complicated. I have attached my form for you to look at.

To recreate:

open form

click "Edit to existing course"

click Page to add an instance of the page subform

click Page to add another instance

use "Move" buttons to rearrange them

When user adds an instance of the page subform, they are really adding an instance of the parent subform Pages. This is so as the child subforms, page, discussion, assessment, dropbox are added by the user, they show up in the order the user calls them.

So, the script for the "Move" buttons need to reference that specific instance of the Page subform. I have accomplished this on my other buttons by referencing this.parent on my buttons. It's not working this time, though.

I attached a sample that Niall graciously tried to fix, but it's not working either. I need to figure out a way to make sure the script is refernencing that specific instance of _Pages.

Thanks for your help.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Ok the issue is that you are not getting the correct subform instance index. I modified the MoveUp code to

show you . I did not do the MoveDown.

Paul

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Ok the issue is that you are not getting the correct subform instance index. I modified the MoveUp code to

show you . I did not do the MoveDown.

Paul