Support

Account

Home Forums General Issues Send repeater field data in Email on submit

Solving

Send repeater field data in Email on submit

  • Trying to generate and email when a user fills in the fields, all the field seems to be working except for the repeater fields.

    I have:

       // check if the repeater field has rows of data
        if( have_rows($_POST['acf']['field_55378d1179797']) ):
    
          // loop through the rows of data
            while ( have_rows($_POST['acf']['field_55378d1179797']) ) : the_row();
    
                // display a sub field value
              $founders .= $founders_fname =      $_POST['acf']['field_55378d143c0d5']; 
              $founders .= '<br />';
              $founders .= $founders_lname =      $_POST['acf']['field_55378d143c718']; 
              $founders .= '<br />';
              $founders .= $founders_linkedin =   $_POST['acf']['field_55378d143cee5']; 
              $founders .= '<br />';
              $founders .= $founders_twitter =    $_POST['acf']['field_55378d143d6b4']; 
              $founders .= '<br />';
              $founders .=  $founders_cv =  $_POST['acf']['field_55378d143de89'];
              $founders .= '<br />';
              $founders .= '<br />';
     
            endwhile;
    
        else :
    
            // no rows found
    
        endif;

    When I echo $founders in the email, I just get an empty field.

    I believe that I shouldn’t be able to check if it has rows on submission, since there is no DB query at that time. when when I remove the row check I get a memory leak.

    Any idea how to tackle this problem?

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Send repeater field data in Email on submit’ is closed to new replies.