• Resolved felixkruip

    (@felixkruip)


    First of all, thank you so much for this incredible plug-in!

    I have created a form with the possibility to add rows in which users can add a file at the beginning of each row. How can I show the name of the uploaded file per row in the table inside the email?

    Right now, when I include the file tag to the email template, it shows as row(1):…/filename, row(2):…/filename2, etc. When I try to put the tag in the PHP to show up in the table, it shows ‘array’.

    Could you help me with this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    First of all, thank you so much for this incredible plug-in!

    you’re wc! Do leave a review when you have a moment to spare.

    When I try to put the tag in the PHP to show up in the table, it shows ‘array’.

    that’s because files are stored as arrays by CF7 the plugin, so you’ll need to access each file details using $file[0]

    Thread Starter felixkruip

    (@felixkruip)

    Thank you for your quick response.

        <table>
          <thead><tr><th>Files</th></tr></thead>
          <tbody>';
        if(!empty($submitted['file-upload'])){
          $style = 'style=[qtm]background-color:#e3e3e3[qtm]';
          foreach($submitted['file-upload'] as $idx=>$file[0]){
          $row=1;
            $tag_replace .='  <tr><td '.($row%2==0?$style:'').'>'.$file[0].'</td></tr>'.PHP_EOL;
            $row++;
          }
        }
        $tag_replace .='
          </tbody>
        </table>

    I’m trying to understand it as I’m still a beginner in PHP. Would something like this work?

    Will definitely give a 5-star review!

    Plugin Author Aurovrata Venet

    (@aurovrata)

    I’m trying to understand it as I’m still a beginner in PHP. Would something like this work?

    you’ll need to try it out. I don’t do specific code review/support as this requires too much time and effort. I limit my support to general guidelines on how to solve problems and bug fixes.

    If you need specific PHP help, I recommend Stackoverflow forums, or enlisting the support for a developer.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘File name in email table’ is closed to new replies.