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

Newbie question about subforms

inriquito
Level 2
Level 2

Hi all,

First of all, apologies for my english. It's really difficult for me trying to explain what I'm going to explain with this "macaroni english" I'm speaking. I beg your understanding. Well, let's go. I'm an educator and I'm am doing my first form intended to my colleagues for avaluation purposes inside my school. It's a fillable PDF. I'm stucked with a (I guess) rather simple thing. We have a lot of students, some of them pass the course and some of them fail. We need to do an individual report for every student who has failed in our class. But I have let's say 3 failed students and any of my colleagues maybe have 7 failed students.

I (think I) need to create a subform in the main form I'm designing with this behavior:

(Numeric field) Number of failed students: X

(and now, I want that a x number of subforms will open, 1 for each student with the usual fields)

Student 1.

Name

Grade

Problems detected

Possible solutions

...

Student 2

...

Student X

(end of subform).

I hope you understand what I need. How can I do this?

Thanks in advance.

Enrique Llorens

1 Accepted Solution
leesutton
Correct answer by
Level 4
Level 4

I've attached a sample of what I think were looking for.

The basic code behind this form generates "x" number of additional instances of the studentDetails subform for each student you require a record for (the code is in the exit of the students field).  The main form itself is "flowed" which allows the form to grow in size, the PDF is saved as a Dynamic PDF which indicates that the look of the document can change dynamically at runtime, and the sub-form has been set to allow it to repeat as many times as required in the binding tab of the object.

View solution in original post

3 Replies
leesutton
Correct answer by
Level 4
Level 4

I've attached a sample of what I think were looking for.

The basic code behind this form generates "x" number of additional instances of the studentDetails subform for each student you require a record for (the code is in the exit of the students field).  The main form itself is "flowed" which allows the form to grow in size, the PDF is saved as a Dynamic PDF which indicates that the look of the document can change dynamically at runtime, and the sub-form has been set to allow it to repeat as many times as required in the binding tab of the object.

View solution in original post

inriquito
Level 2
Level 2

Hi again,

I said that your subform was perfect, but doesn't work as well as I expected. I copy/pasted your subform to my form and changed captions and format to adapt it to my needs, but the result doesn't work perfectly. I expected that, if the number of failed students was more than one, the script would generate more of 1 instances of the subform, "pushing down" the rest of the form for making room to the instances. But this doesn't happen. Instead, it only creates 1 instance of the subform and in the # field the numbers 1,2 and so on are "crowded". I attach my original form because of my horrible explanation. Your code is implemented in the points 2.3 and 2.4 of my form. Can you help me with this? Again, many thanks in advance.

P.S. Another thing I can understand is how can I get rid of the first blank pàge in the form. I created a master page, but I don't want to see it in the final presentation of the form. Thanks!