Google forms: Assign questions to Page Break and go to page -
In relation to this, when more questions are added, on the same or different page, only the last question is displayed correctly is. Other questions just show the structure (eg multiple options, lists) The following code shows the problem:
function vs () {var title = 'Multipage Form Test'; Var details = 'Stackoverflow question 17083500'; Var form = formApseSket ('questionnaire') .Sat Description ('questionnaire') .setConfirmationMessage ('Thanks for the response!'); Var page 1 = form.addPageBreakItem () .setTitle ('first page'); Var item = form.addMultipleChoiceItem (); Var items = form.addListItem (); Var item = form.addMultipleChoiceItem (); Var page 2 = form.addPageBreakItem () .setTitle ('second page'); Var item = form.addMultipleChoiceItem (); Var page 3 = form.addPageBreakItem () .setTitle ('third page'); Item.setTitle ('question') .setChoices ([item.createChoice ('yes'), item.createChoice ('no')]); Item.setTitle ('question') .Setcover ([item.createChoice ('yes', page 2), item.createChoice ('no', page 3)]); Item.setTitle ('question') .setChoices ([item.createChoice ('yes'), item.createChoice ('no')]); Item.setTitle ('question') .setChoices ([item.createChoice ('yes'), item.createChoice ('no')]); Logger.log (form.getEditUrl ()); Logger.log (form.getPublishedUrl ()); } How is it possible to assign pages and display questions?
Many thanks for your reply, Sophia P.
It is necessary to set item options immediately after adding each new item to the current page. After making page 3 all the options were set / reassigned to 1 item.
var item = form.addMultipleChoiceItem (); Item.setTitle ('question') .setChoices ([item.createChoice ('yes'), item.createChoice ('no')]); Var items = form.addListItem (); Item.setTitle ('question') .Setcover ([item.createChoice ('yes', page 2), item.createChoice ('no', page 3)]); Var item = form.addMultipleChoiceItem (); Item.setTitle ('question') .setChoices ([item.createChoice ('yes'), item.createChoice ('no')]);
Comments
Post a Comment