Hi,
that is exactly what i need for my form.
I have a form where Information ist stored in a database via eform2db( [!GeldForm!] ).
No i want to add an upload function for pdf files.
So i created a snippet called "File" and copied the code
function saveFile( &$fields ){
// get the $_FILE data and save the file to disk
$uploaddir = 'assets/files/';
$uploadfile = $uploaddir . basename($_FILES['fieldname']['name']);
if (move_uploaded_file($_FILES['fieldname']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file upload attack!\n";
}
echo '<pre>';
echo 'Here is some more debugging info:';
print_r($_FILES);
echo '</pre>';
return true;
}
into.
But how do i integrate the Snippet into my form?
Can i use the &eFormOnBeforeMailSent twice in a snippetcall like this:
[!GeldForm!]
[!eForm? &formid=`geldformular` &eFormOnBeforeMailSent=`GeldForm` &eformOnBeforeMailSent=`File` &tpl=`GeldForm` &thankyou=`334` &vericode=`1` &subject=`Geldprämie`!]
Sry for my bad english, i hope u can understand my question.