• Resolved lordxtina

    (@lordxtina)


    First of all, great plugin!

    My client wants to have a sign up form where users can enter 10 entries. Then with the hit of submit button, those entries will be stored to Google sheet in 10 separate rows.

    Could you please help figure out? Thank you so much.

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

    (@westerndeal)

    Hi,
    Thanks for using the plugin,
    Do you want to create a signup form using Contact Form 7 Plugin?
    This plugin will work with contact form 7 only, and all the entries will save in different columns not in separate rows, either you can use some excel formula for the required layout row wise.

    Let me know further,

    Thanks & Regards
    Abdullah

    Thread Starter lordxtina

    (@lordxtina)

    Yes, we’re already using CF7.

    Again, we will have 10 of this:

    View post on imgur.com

    Then on Submit, those 10 values will be inserted to the Google sheet in 10 separate rows. E.g.

    1st entry / row will be:
    Juan
    dela Cruz
    [email protected]
    CEO
    Manila

    2nd entry / row will be:
    Uncle
    Sam
    [email protected]
    Director
    New York

    and so on. I found this code:

                foreach ( $posted_data as $key => $value ) {
                   // exclude the default wpcf7 fields in object
                   if ( strpos($key, '_wpcf7') !== false || strpos($key, '_wpnonce') !== false ) {
                      // do nothing
                   } else {
                      // handle strings and array elements
                      if ( is_array($value) ) {
                         $data[$key] = implode( ', ', $value );
                      } else {
                         $data[$key] = $value;
                      }
                   }
                }
    
                $doc->add_row($data);

    I’m guessing that’s where I can implode or explode them?

    Thanks for your help!

    Thread Starter lordxtina

    (@lordxtina)

    The Google sheet should look like this:

    View post on imgur.com

    Thread Starter lordxtina

    (@lordxtina)

    I tried to make an array by using brackets in the input name (e.g. firstname[]), but the shortcode won’t accept square brackets.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Enter multiple entries at once’ is closed to new replies.