How can I control the prefix of uploaded files
When you upload a file through a form created in RSForm!Pro, the component will automatically add a unique prefix to the file in order to help avoid duplicates. You can control this feature from the File Prefix property of the Upload field. There are several ways to use this field:
- leave the property blank; this will use the default RSForm!Pro prefix
- add your own text that will be used as a prefix
You can also add custom scripts to this field, this will offer you more freedom when setting the prefix of the files(for example using information that was submitted in the form or disabling the prefix). In order to stop the component from adding a prefix you can use the following script:
//<code> return ''; //</code>
In order to use a value submitted in the form as the prefix(for example the submitting user's name) you can use:
//<code> return $_POST['form']['field-name'].'_'; //</code>
11 persons found this article helpful.
You Should Also Read
Uploads are not working HOT |
Uploaded files are not being attached to emails HOT |
File Upload fields do not work in Safari on iOS |
Special characters not saved in uploaded file names |