I did see that konsument but when I changed the details the form no longer sends. I added this to my functions file:
add_action( 'wpcf7_before_send_mail', 'my_dynamic_attachments' );
function my_dynamic_attachments($cf7)
{
//check if it is the registration form
if ($cf7->id==630)
{
// get the dropdown menu value and the corresponding file
$filename = uploads/2017/11/test1.pdf($cf7->form['checkbox-233']);
$cf7->uploaded_files = array('test1'=>$filename);
}
}
Can you advise where I went wrong?
My form ID is 630, my field ID is checkbox-233 and finally my checkbox ID is test1.
My initial post said a dropdown but it’s actually a set of 3 tickboxes I’m using. My mistake.
Thanks for your advise.