Hi all,
i'm trying to do a form that uploads a file from the user to the server, then it needs to attach it to an email and send it.
i'm using the file upload [GH] for it.
now i need to know the file name after the post button has been pressed.
can you please explain to me how to get the name of the file into a php variable?
thanks in advance.
i'm trying to do a form that uploads a file from the user to the server, then it needs to attach it to an email and send it.
i'm using the file upload [GH] for it.
now i need to know the file name after the post button has been pressed.
can you please explain to me how to get the name of the file into a php variable?
thanks in advance.
Hi mastershay,
From the Upload Files [GH] Help tab:
The curly tags represent entries in the $form->data array.
You can use a Debugger action to check exactly what data you have at any point in the form event.
Bob
From the Upload Files [GH] Help tab:
The file data will be made available in a series of form data values: the file name in {input_name}; the file size in {input_name_size}; the file size in {input_name_url}; and the file url in {input_name_url}. In each case replace input_name with the name of the input in your form e.g. {input_file_0_path}
File data will also be saved in the $form->files and $form->data['_PLUGINS_']['upload_files'] arrays. You can add a "Custom code" action after this one and use this code to check the response data stored: print_r($form->data['_PLUGINS_']['upload_files']);
The curly tags represent entries in the $form->data array.
You can use a Debugger action to check exactly what data you have at any point in the form event.
Bob
This topic is locked and no more replies can be posted.