2015-04-15 89 views
0

是否有人會爲我提供一個GoogleApps腳本的工作示例來生成一個三頁的Google表單,其中第一個ListItem問題將包含基於頁面的問題,號碼選擇是否會將答辯人指向第2頁或第3頁,並在第2頁和第3頁上列出了一些問題?看起來完全有可能只在頁面爲空時才指向一個有意識的頁面,但在頁面上添加問題時它不起作用。遇到這個問題,我發現了兩個對堆棧溢出的貢獻(參見下文,包括代碼我也試過了),問題仍然沒有解決,答案僅限於空白頁面。多頁Google表單,指出被訪者轉到指定頁面

非常感謝您的工作代碼。

Google forms: Assign questions to Page Break and go to page

+1

你最好的機會獲得幫助將顯示你的嘗試和你有什麼問題。 –

回答

1

但是當問題被添加

...提供沒有對你來說是最好的工作代碼,這是行不通的,但 修改我前面的例子,你鏈接...

function myFunction() { 
    var title = 'GoToPage item example'; 
    var form = FormApp.create('My form example') 

    // Create pages and items in order 
    var item1 = form.addListItem().setTitle('First question'); 
    var page2 = form.addPageBreakItem().setTitle('Second page'); 
    var item2 = form.addListItem().setTitle('Second question') 
    var page3 = form.addPageBreakItem().setTitle('Third page'); 
    var item3 = form.addTextItem().setTitle('Third question') 

    // Now set item choices 
    item1.setChoices([ 
    item1.createChoice('Choice 1',page2), 
    item1.createChoice('Choice 2',page3) 
    ]); 

    item2.setChoices([ 
    item2.createChoice('Choice 3',page3), 
    item2.createChoice('Choice 4',FormApp.PageNavigationType.SUBMIT) 
    ]); 
} 
+0

非常感謝!它工作順利。 – Silvie