• Resolved joeeyireland1628

    (@joeeyireland1628)


    Hi I have multiple contact forms on my site can I restrict this plugin to only capture the uploads from a certain contact form ID

Viewing 1 replies (of 1 total)
  • Thread Starter joeeyireland1628

    (@joeeyireland1628)

    SOLVED:

    using the code below you can before the submission takes place look for the contact form ID

    if($contactForm->id == 1111)
        {
            if ($submission) {
                //error_log('submission from cf7 este:' . print_r($submission));
                $uploaded_files = $submission->uploaded_files();
                if ($uploaded_files) {
                    foreach ($uploaded_files as $fieldName => $filepath) {
                        $data = nmr_create_attachment($filepath);
                    }
                }
            }
        }
Viewing 1 replies (of 1 total)
  • The topic ‘Stop it from taking uploads from all forms’ is closed to new replies.