Rename file on upload

Warren.Kessler 26 Aug, 2022
I have recently updated to CF7 and in the process of updating most of my forms from CF5. I am having trouble figuring out how to rename a file that is being uploaded. I would like use the information of the name fields in the form to rename the file.

in CF5 I used this code in the File Upload action > File name code:
return $form->data['FirstName'].'-'.$form->data['LastName'].'-'.date('Y-m-d_His').'.jpg';

I am thinking i need to use the File name provider in CF7 so I tried this, but not doing anything.

Any help is appreciated.

You need to login to be able to post a reply.