solved
After many hours of fiddling and testing, rebuilding the form, testing again. It works!!
Set up your form, be sure to include the name and id of the form. I didn't see this highlighted anywhere but it doesn't work without it.
Apply the DA Repeater to the input fields including the file field. But not the submit button.
I used a INT from a getRecordset to set the amount of repeats. In this example it was the user's number of children.
I then used the DA Insert Multiples behaviour (all this is well document in the dataassist/ recipes)
Test to make sure all is working (the file name will be blank at the moment)
Next apply a DFP upload (from the insert menu) to the page and select the repeating elements you require. Including the file field, but make sure for the Value for the File you press the lightening bolt and find the WA_UPLOAD variables and use Server Filename, this will be sure to insert the filename as it was used and potentially changed by DFP.
(note, once you start changing things here the behaviours will disappear from your interface, meaning that you can't use the DA wizards and forms to make changes)
Find the code that uploads the file.
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult1", "fileField_".$RepeatSelectionCounter_1 ."", "2", "[NewFileName]_[Increment]", "false", $WA_UploadResult1_Params);
}
?>
cut and paste the IF part into a new file leaving
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
?>
Next find:
// WA DataAssist Multiple Inserts
and in the WHILE - IF curly brackets paste the contents of the previous IF you pulled earlier:
(I have put a blank between WA code and my new pasted line as I can't see any formatting options for this post)
if ($WA_insertIfNotBlank == "" || WA_AB_checkLoopedFieldsNotBlank(array($WA_insertIfNotBlank), $WA_multipleInsertCounter)) {
WA_DFP_UploadFiles("WA_UploadResult1", "fileField_".$WA_multipleInsertCounter ."", "2", "[NewFileName]_[Increment]", "false", $WA_UploadResult1_Params);
$WA_fieldValuesStr = "".$WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"] . "|" . "".WA_AB_getLoopedFieldValue("kidName", $WA_multipleInsertCounter) ."" . "|" . "".WA_AB_getLoopedFieldValue("kidDate", $WA_multipleInsertCounter) ."";
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
You will see I have replaced $RepeatSelectionCounter_1 with the repeating number for the multiple inserts loop $WA_multipleInsertCounter
And that pretty much should be it.
Good luck, is very handy if you have a table of images and and want to assign many images to an entry in another table e.g. users and users photos.