Custom file name in cforms download

I really like the cforms plugin for wordpress. It is very powerful, but easy to use. But today I ran into a dead end.

Basically, I need a form so that users can submit their first and last name, and then upload two files that I need to rename to " A_Firstname.Lastname.ext " and " B_Firstname.Lastname.ext ".

By default, cforms simply leaves the file name, as it did with the bootloader. If someone is familiar with the cforms plugin, then any recommendations would be greatly appreciated!

Thanks in advance.

+3
source share
1 answer

, my_cforms_logic my-functions.php(my_cforms_logic 270 lib_validate.php, , ).

my-functions.php , test_ :

function my_cforms_logic($cformsdata,$oldvalue,$setting) {

if ( $setting == "filename" ){
    return 'test_' . $oldvalue;
}

return $oldvalue;
}

, , ( , - $cformsdata ['data'] ['Firstname'] ), .

+2

All Articles