WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form DB
[resolved] [Plugin: Contact Form 7 to Database Extension] How do I hide fields in the Google Live Data Export (9 posts)

  1. gillespieza
    Member
    Posted 2 years ago #

    I have successfully followed the instructions for using the Google Live Data export, but I was wondering if I could hide certain columns (or rather, not retrieve them at all) - like _wpnonce and such. I tried putting something like hide='_wpnonce' into the optional search section but no results were returned at all then.

    http://wordpress.org/extend/plugins/contact-form-7-to-database-extension/

  2. Michael Simpson
    Member
    Plugin Author

    Posted 2 years ago #

    This isn't nicely supported right now, but you can make it work. Edit the script file, add the line right below where I have "ADD THIS NEXT LINE"

    function fetchCF7ToDBCSVResponse(siteUrl, formName, search, user, pwd) {
        var encformName = encodeURI(formName).replace(new RegExp("%20", "g"), "%2B");
        var url = siteUrl + "/wp-login.php?redirect_to=wp-admin/admin-ajax.php%3Faction%3Dcfdb-export%26form%3D" + encformName;
        if (search != null && search != '') {
            url += '%26search%3D' + encodeURI(search);
        }
    // ADD THIS NEXT LINE
            url += '%26hide%3D' + encodeURI('wpnonce');
    
        return UrlFetchApp.fetch(
                url,
                {
                    method: "post",
                    payload: "log=" + encodeURI(user) + "&pwd=" + encodeURI(pwd)
                });
    }
  3. littledove22
    Member
    Posted 2 years ago #

    @gillespieza - Please share how you were able to get Live Data export working. I followed the instructions but it does not say if I should overwrite the content Google has already in the script area.

    I added my content after the script in question, with my login and pswd, but the form just gives me an error and the parameters are correct.

    Thank you for your assistance. I cannot find anything else about this in the documentation.

  4. gillespieza
    Member
    Posted 2 years ago #

    @littledove22 I went to Contact 7 > Database, selected the database from the list, chose Google Spreadsheet Live Data export from the list at the top, followed the instructions in the window that popped up, and it just worked...

    I started with a blank spreadsheet, and overwrote anything scripting that appeared in the script editor with the script given in the link/instructions.

  5. littledove22
    Member
    Posted 2 years ago #

    It worked. There is a delay between the time you setup the document and the live data begins to populate the spreadsheet. No mention of the time delay was mentioned. Thanks.

  6. gillespieza
    Member
    Posted 2 years ago #

    There is also no mention of how often it updates and I can't find a way to force-refresh the data...

  7. mstone3228
    Member
    Posted 1 year ago #

    Hello I am using Contact Form 7 export database functionality to export my data to a google spreadsheet. The issue I am having is I have a security setting set up to hide my backend of the normal login of http://www.examplesite.com/wp-admin. The script I put into google to collect the data uses this line to login to wordpress to collect that data and uses this code "/wp-login.php?redirect_to=wp-admin/admin-ajax.php%3Faction%3Dcfdb-export%26form%3D" to do so.

    Is it possible to change that code to make this work instead. The secure way I login to the admin area is this http://www.examplesite.com/wp-admin/?access-adminarea. Can you tell me how to edit this script to use my secure way of logging in?

  8. mstone3228
    Member
    Posted 1 year ago #

    Hello, is there a reason I have to be logged in to my wordpress site in order to view the file uploads from my form in google docs? If im not logged into my wordpress site then i get a message saying You do not have sufficient permissions to access this page.

    thanks

    matt

  9. Michael Simpson
    Member
    Plugin Author

    Posted 1 year ago #

    The google spreadsheet just has a link to the upload doc which sits back on your wordpress site, which requires you to be logged in to retrieve it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic