Support » Plugin: CF7 Google Sheets Connector » Really bad! Skipping rows if another data in another column

  • Resolved shenalorlof

    (@shenalorlof)


    Dear supporter,

    When a form submit data display from col A to col E . And on F column i have entered some other data on google sheet. https://ibb.co/ZgBk5gs Please check this image..
    Here,
    A) is the data which comes from the form.
    B) is the data i have typed on the google sheet
    C) is where the data will be starting to display (row 21) Because, till row 20 there are values in the F column which is not related to the form(A-E).

    What i want is not to consider other columns and display data as it is suppose to.

    This is a great plugin and my hope is to support best plugins but this issue is really bothering me.

    Thank you and Best Regards. Hope to hear from you soon

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

    (@westerndeal)

    Hi @shenalorlof,

    Thank you for providing the screenshots for a better understanding of your requirement.

    The current codebase doesn’t have the functionality to add the data to the row where at some columns the data already exist. It will always take a fresh new row and add data.

    If you want to add a custom equation and have data for the column “Points”, you can create a hidden field and implement the CF7 hook “wpcf7_special_mail_tags” and return the values.

    Hope this helps. Let us know.

    Thanks
    Abdullah

    Thread Starter shenalorlof

    (@shenalorlof)

    Hi, how can I do this process? Any examples which may help?

    Plugin Author westerndeal

    (@westerndeal)

    Hi @shenalorlof,

    Here is how you can process.

    Create a hidden field and name it as “points”.

    Now add the below code and modify as per your requirement by creating any custom plugin or the functions.php file of the active theme used.

    add_filter( "wpcf7_special_mail_tags", function( $output, $name, $html ) {
        $submission = WPCF7_Submission::get_instance();
        $posted_data = $submission->get_posted_data();
       if ( $name === "points" ) {            
          // Get all posted data here which you require for creating equation and return.
          $output = $posted_data[''];
          return $output;
       }
       return $output;
    }, 10, 3 );

    Hope this helps.

    Thanks
    Abdullah

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.