Thanks for the details on the radio buttons, that will work.
But the files one might end up being too complex.
Let me elaborate some more.
In our PDF template, we have space for 6 photos, like in the attachment.
In our gravity form (over multiple pages) we ask the user various questions on each 'room' in a house, and if applicable the user uploads up to 3 photos (as 3 separate file inputs).
These questions with photo uploads are duplicated over multiple 'pages' in the form.
So the user could upload:
- Room 1: 0 photos
- Room 2: 2 photos (r2-photo1, r2-photo2)
- Room 3: 3 photos (r3-photo1, r3-photo2, r3-photo3)
In total = 5 photos
How can we then map those 5 uploaded photos, to the 6 photo 'areas' in the PDF (as shown in attachment).
I'm guessing the logic is going to get very complex, as we need to somehow check if each photo exists, and then put into order, and into the 6 areas.
e.g. for the 1st PDF photo area, something like:
IF r1-photo1, show img, Else IF r1-photo2, show img, Else IF r1-photo3, show img, Else IF r2-photo1, show... and so on........
If you can't think of way of doing this directly in e2pdf, do you think something like this would work instead:
1. Hook into the gravity form submission (e.g. gform_pre_submission)
2. When user submits form, use some PHP logic to check for existing room photos, and build up a list of those photos
3. Take list of photos, and copy photos into more manageable fields of photo1, photo2, photo3, photo4, photo5, photo6 (presume these would need to be setup in gravity forms as hidden/admin fields?)
4. Form submitted as normal (with admin photo fields added)
5. e2PDF can then more easy map 1 to 1 of the 'admin' photo fields to PDF
What do you think?