cforms II User Forum

Registration is currently disabled.
Guest

FAQs

Login form protected by Login LockDown.


Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

    

Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS Related Topics
File Rename
I am trying to rename uploaded files. Pls help...
February 13, 2014
2:26 pm
Taiki
Guest

Hi all,

I am trying to rename uploaded files using the following code in my-functions.php. I am using the field names for my form. Can anyone help me by telling me why it's not working.  Any help would be truly appreciated.

Please help.

Thanks,

Taiki

function my_cforms_logic($cformsdata,$oldvalue,$setting) {
 if ( $setting == "filename" ){
 return $_POST['cf2_field_2'] . '_' . $_POST['cf2_field_3'] . '_' . $_POST['cf2_field_4'] . '_' . $_POST['cf2_field_5'] . '_' . $_POST['cf2_field_6'] . $oldvalue;
 }
}

 

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
35 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

tracedef: 43

mores: 21

Gyrus: 20

frozenwaste: 18

asuffredini: 15

photoworks: 14

Member Stats:

Guest Posters: 3762

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5361

Posts: 18742

Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass

Moderators: Paul (421), cnymike (8), sonika (95)

Administrators: Oliver (6400), Nicky (3)