dqan70724 2015-07-21 19:03
浏览 58
已采纳

如何使用谷歌表单从textareas提交多页用户输入数据?

Right now, I have multiple pages in my website that require user input paragraphs. Basically a quiz, users fill out a paragraph and click next to go to the next page, where they do the same.

I am using google forms to do so. I have taken the code from the source code. When a user submits one page, the forms record that answer and work fine. However, I'd like one submit button. When I do this, the google forms do not keep the inputs after the user leaves the page.

How can I have google forms on each page of my website and one submit button at the end?

I'm sure there is some way to use php but i'm not familiar with php at all, I'd like to stick with google docs.

<div class="page">
    <p>whole bucnh of stuff</p>
        <div class="quesone">
            <p>Question</p>

            <form action="MY-GOOGLEDOC-LINK" method="POST" id="ss-form" target="_self" onsubmit=""><ol role="list" class="ss-question-list" style="padding-left: 0">

                <div class="ss-form-question errorbox-good" role="listitem">
                <div dir="ltr" class="ss-item  ss-paragraph-text"><div class="ss-form-entry">
                <label class="ss-q-item-label" for="entry_1389428292"><div class="ss-q-title">ques 1
                </div>
                <div class="ss-q-help ss-secondary-text" dir="ltr"></div></label>
                <textarea name="entry.1389428292" rows="8" cols="0" class="ss-q-long" id="entry_1389428292" dir="auto" aria-label="ques 1  "></textarea>
                <div class="error-message" id="93637676_errorMessage"></div>
            </div></div></div></div></form>

        </div>

        <div class="questwo">
            <p>Question</p>

            <form action="SAME-GOOGLEDOC-LINK" method="Post" id="ss-form" target="_self" onsubmit=""><ol role="list" class="ss-question-list" style="padding-left: 0">

                <div class="ss-form-question errorbox-good" role="listitem">
                <div dir="ltr" class="ss-item  ss-paragraph-text"><div class="ss-form-entry">
                <label class="ss-q-item-label" for="entry_800521984"><div class="ss-q-title">ques 2
                </div>
                <div class="ss-q-help ss-secondary-text" dir="ltr"></div></label>
                <textarea name="entry.800521984" rows="8" cols="0" class="ss-q-long" id="entry_800521984" dir="auto" aria-label="ques 2  "></textarea>
                <div class="error-message" id="1771597426_errorMessage"></div>
            </div></div></div></div></form>

        </div>

This is what my code looks like on each page of my website. Here is what my submit button on the last page looks like:

<form action="SAME-GOOGLEDOC-LINK" method="POST" id="ss-form" target="_self" onsubmit=""><ol role="list" class="ss-question-list" style="padding-left: 0">

        <input type="hidden" name="draftResponse" value="[,,&quot;-6067873700707440617&quot;]
        ">
        <input type="hidden" name="pageHistory" value="0">

        <input type="hidden" name="token" value="DpdKrU4BAAA.cBu0TrL7ZVMA6-GJ7Dn4Vw.BBwYcdE16jIxlc5c1a9l3w">
        <input type="hidden" name="fbzx" value="-6067873700707440617">
        <div class="ss-send-email-receipt" style="margin-bottom: 4px;" dir="ltr"><label for="emailReceipt" style="display:inline;"><input type="checkbox" name="emailReceipt" value="true" id="emailReceipt" checked>
        Send me a copy of my responses.</label></div>
        <div class="ss-item ss-navigate"><table id="navigation-table"><tbody><tr><td class="ss-form-entry goog-inline-block" id="navigation-buttons" dir="ltr">
        <input type="submit" name="submit" value="Submit" id="ss-submit" class="jfk-button jfk-button-action ">
        <div class="ss-password-warning ss-secondary-text">Never submit passwords through Google Forms.</div></td>
        </tr></tbody></table></div></ol></form>

I just want all my data to be submitted on the last page so that when the user submits, they receive only one email containing all their answers from the google forms. If there is any easier way to do this let me know!

  • 写回答

1条回答 默认 最新

  • dqhr76378 2015-07-21 19:20
    关注

    What you are talking about is persisting application state across multiple page views. Since HTTP is by design a stateless protocol, you must use one of several other methods to persist state. These methods include:

    • Session storage
    • Cookies
    • HTML5 localStorage
    • HTML5 sessionStorage
    • Passing parameters in URL

    Which to use can depend on a lot of factors including information security, whether you need to persist data across sessions, etc. Unfortunately, the question itself is probably too broad and may be closed, but I at least wanted to give you a better explanation as to why than would be allowed in a short comment.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛