We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42042
    • 140 Posts
    Hi all,

    Is their a way to save formit forms to a local spreadsheet or better a Google drive spreadsheet? I've tried the Zapier extra but it was to hard to setup so no luck there.

    We'd like to list al submissions for further lead development.

    Many thanks guys, getting smarter every project.


    Best,
    Ilja

    This question has been answered by ilja-web. See the first response.

    • discuss.answer
      • 42042
      • 140 Posts
      Did get it working with the help of cloudstich!
        • 9439
        • 90 Posts
        Hello ilja-web

        Thanks for the pointer to cloudstitch. Think it's what I'm looking for too. How did you get on using it? Did it work well with formit?

          David Heriot
          pfsmedia
          • 42042
          • 140 Posts
          Quote from: faolie at Nov 30, 2016, 02:27 PM
          Hello ilja-web

          Thanks for the pointer to cloudstitch. Think it's what I'm looking for too. How did you get on using it? Did it work well with formit?


          Np. Yeah I created a custom hook:

          <?php 
          
          $name = $hook->getValue('fname'), FILTER_SANITIZE_EMAIL);
          $email = filter_var($hook->getValue('femail'), FILTER_SANITIZE_EMAIL);
           
          $data = array(
          	'userName' =>$name,
          	'userEmail' =>$email 
          );
          
          $url = 'https://api.cloudstitch.com/link/to/sheet';
          
          $options = array(
            'http' => array(
              'method'  => 'POST',
              'content' => json_encode( $data ),
              'header'=>  "Content-Type: application/json\r\n" .
                          "Accept: application/json\r\n"
              )
          );
          
          $context  = stream_context_create( $options );
          $result = file_get_contents( $url, false, $context );
          $response = json_decode( $result );
          
          if($response->success === true){
          	var_dump('succes');
          } else {
          	var_dump('fail');
          }
          
          // Return
          return true;
          
            • 9439
            • 90 Posts
            Thanks ilja-web. I borrowed and tweaked your little snippet. Works perfectly!
              David Heriot
              pfsmedia
              • 42042
              • 140 Posts
              @Faolle, NP glad I could help smiley