Chris Flowers
Posts: 0
Joined: Wed Mar 26, 2014 9:17 pm

Save information entered in app to a file on Google Drive

Hello, I have created a very basic app that requests the user enters some information i.e. date, name, comments, role etc. On the last page is a submit button. What I would like to achieve is the information entered is saved to a CSV or text file in a Google Drive account. Can anyone advise how I can achieve this please? Thanks!

Chris Flowers6766842
Posts: 0
Joined: Thu Mar 27, 2014 8:26 pm

Save information entered in app to a file on Google Drive

Hello

Ok thanks for the info. I perhaps need a little more guidance though. I'm a complete novice really, with only some basic HTML coding skills used years back creating website or two!

I guess my question is two fold:

"Once the 'SUBMIT' button is tapped how do I..."

1) "...have the app collate the information entered in to the text boxes, date's, name etc.?"

2) "...then save that collated information to Google Drive?"

I appreciate you kind of answered 2) with that link. I see that I need to apply some code (possibly Javascript) to take care of that.

I've attached the two screenshots of the app.

Thanks again.

Image

Image

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Save information entered in app to a file on Google Drive

Hi Chris,

This is brief plan:

  1. You have to add "JavaScript" event handler on your button. See details: http://prntscr.com/34rpd2/direct

  2. In the editor you should:

    2.1 get all fields information in local variables.
    pre
    //Where "input_name" - is name for input.
    var name = Appery("input_name").val();
    var jobTitle = Appery("input_jobTitle").val();
    ....
    /pre
    2.2 Create file content from data you have.
    pre
    var fileContent = "";
    fileContent += "\nname = " + name;
    fileContent += "\njob title = " + jobTitle;

    ......
    /pre
    2.3 Send this file content to google drive with functions described in the given document: https://developers.google.com/drive/w...

    That's all.

Return to “Issues”