Hi,
I think you can use this way :
1. Add all off "file" field to your form and hide it from the user (except first field)
2. Add some button/link to add or remove the "file" field.
So the user will get the field one by one, if this way meet your requirement you need to edit "includes/view-functions.php" file,let say you have "file element" with ID from 1 ~ 6 and you will apply on form 1. Then try to follow these steps :
1. Edit "view-functions.php" file and go to around line 1833 ~ 1834, you will see this :
//If you would like to remove the "Powered by MachForm" link,..
$form_markup = <<<EOT
put these code above that line
if ($_GET['id'] == 1) {
$add_jquery = "
<script type=\"text/javascript\">
$(document).ready(function(){
$('#li_2').hide();
$('#li_3').hide();
$('#li_4').hide();
$('#li_5').hide();
$('#li_6').hide();
});
var li_position = 1;
var li_max = 6;
var li_min = 1;
function ShowFile() {
if (li_position < li_max) {
li_position += 1;
$('#li_' + li_position).show();
}
}
function HideFile() {
if (li_position > li_min) {
$('#li_' + li_position).hide();
li_position -= 1;
}
}
</script>
";
}
2. Create a section break in your form and add this code to "section break" field label :
<a href="javascript:ShowFile()">add</a>
<a href="javascript:HideFile()">Remove</a>
You also can change the "a" tag to an image link and make sure you've adjust those ID with yours.
MachForm Support