Class Form

ফর্ম

একটি ফর্ম যা সামগ্রিক বৈশিষ্ট্য এবং আইটেম ধারণ করে। বৈশিষ্ট্যগুলির মধ্যে রয়েছে শিরোনাম, সেটিংস এবং প্রতিক্রিয়াগুলি কোথায় সংরক্ষণ করা হয়৷ আইটেমগুলি চেকবক্স বা রেডিও আইটেমগুলির মতো প্রশ্ন আইটেমগুলি অন্তর্ভুক্ত করে, যখন লেআউট আইটেমগুলি পৃষ্ঠা বিরতির মতো জিনিসগুলিকে নির্দেশ করে৷ FormApp থেকে ফর্মগুলি অ্যাক্সেস করা বা তৈরি করা যেতে পারে৷

// Open a form by ID and create a new spreadsheet.
var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
var ss = SpreadsheetApp.create('Spreadsheet Name');

// Update form properties via chaining.
form.setTitle('Form Name')
    .setDescription('Description of form')
    .setConfirmationMessage('Thanks for responding!')
    .setAllowResponseEdits(true)
    .setAcceptingResponses(false);

// Update the form's response destination.
form.setDestination(FormApp.DestinationType.SPREADSHEET, ss.getId());

পদ্ধতি

পদ্ধতি রিটার্ন টাইপ সংক্ষিপ্ত বর্ণনা
addCheckboxGridItem() CheckboxGridItem কলাম এবং সারিগুলির একটি গ্রিড হিসাবে উপস্থাপিত একটি নতুন প্রশ্ন আইটেম যুক্ত করে, যা উত্তরদাতাকে চেকবক্সগুলির একটি ক্রম থেকে প্রতি সারিতে একাধিক পছন্দ নির্বাচন করতে দেয়৷
addCheckboxItem() CheckboxItem একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে এক বা একাধিক চেকবক্স নির্বাচন করতে দেয়, সেইসাথে একটি ঐচ্ছিক "অন্যান্য" ক্ষেত্র।
addDateItem() DateItem একটি নতুন প্রশ্ন আইটেম যোগ করে যা উত্তরদাতাকে একটি তারিখ নির্দেশ করতে দেয়।
addDateTimeItem() DateTimeItem একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে একটি তারিখ এবং সময় নির্দেশ করতে দেয়৷
addDurationItem() DurationItem একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে একটি দৈর্ঘ্য নির্দেশ করতে দেয়।
addEditor(emailAddress) Form প্রদত্ত ব্যবহারকারীকে Form সম্পাদকদের তালিকায় যুক্ত করে।
addEditor(user) Form প্রদত্ত ব্যবহারকারীকে Form সম্পাদকদের তালিকায় যুক্ত করে।
addEditors(emailAddresses) Form Form জন্য সম্পাদকদের তালিকায় ব্যবহারকারীদের প্রদত্ত অ্যারে যোগ করে।
addGridItem() GridItem কলাম এবং সারিগুলির একটি গ্রিড হিসাবে উপস্থাপিত একটি নতুন প্রশ্ন আইটেম যুক্ত করে, যা উত্তরদাতাকে রেডিও বোতামগুলির একটি ক্রম থেকে প্রতি সারিতে একটি পছন্দ নির্বাচন করতে দেয়৷
addImageItem() ImageItem একটি নতুন লেআউট আইটেম যুক্ত করে যা একটি চিত্র প্রদর্শন করে।
addListItem() ListItem একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে একটি ড্রপডাউন তালিকা থেকে একটি পছন্দ নির্বাচন করতে দেয়৷
addMultipleChoiceItem() MultipleChoiceItem একটি নতুন প্রশ্ন আইটেম যোগ করে যা উত্তরদাতাকে রেডিও বোতামের তালিকা বা একটি ঐচ্ছিক "অন্য" ক্ষেত্র থেকে একটি পছন্দ নির্বাচন করতে দেয়৷
addPageBreakItem() PageBreakItem একটি নতুন লেআউট আইটেম যোগ করে যা একটি পৃষ্ঠার শুরুকে চিহ্নিত করে।
addParagraphTextItem() ParagraphTextItem একটি নতুন প্রশ্ন আইটেম যোগ করে যা উত্তরদাতাকে পাঠ্যের একটি ব্লক প্রবেশ করতে দেয়৷
addScaleItem() ScaleItem একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে রেডিও বোতামগুলির একটি সংখ্যাযুক্ত ক্রম থেকে একটি বিকল্প বেছে নিতে দেয়৷
addSectionHeaderItem() SectionHeaderItem একটি নতুন লেআউট আইটেম যুক্ত করে যা দৃশ্যত একটি বিভাগের শুরুকে নির্দেশ করে৷
addTextItem() TextItem একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে পাঠ্যের একটি লাইন প্রবেশ করতে দেয়।
addTimeItem() TimeItem একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে দিনের একটি সময় নির্দেশ করতে দেয়।
addVideoItem() VideoItem একটি নতুন লেআউট আইটেম যুক্ত করে যা একটি ভিডিও প্রদর্শন করে।
canEditResponse() Boolean ফর্মটি জমা দেওয়ার পরে একটি প্রতিক্রিয়া সম্পাদনা করার জন্য একটি লিঙ্ক প্রদর্শন করে কিনা তা নির্ধারণ করে৷
collectsEmail() Boolean ফর্মটি উত্তরদাতাদের ইমেল ঠিকানা সংগ্রহ করে কিনা তা নির্ধারণ করে।
createResponse() FormResponse ফর্মে একটি নতুন প্রতিক্রিয়া তৈরি করে।
deleteAllResponses() Form ফর্মের প্রতিক্রিয়া স্টোর থেকে জমা দেওয়া সমস্ত প্রতিক্রিয়া মুছে দেয়৷
deleteItem(index) void ফর্মের সমস্ত আইটেমের মধ্যে একটি প্রদত্ত সূচীতে আইটেমটি মুছে দেয়।
deleteItem(item) void প্রদত্ত আইটেম মুছে দেয়।
deleteResponse(responseId) Form ফর্মের প্রতিক্রিয়া দোকান থেকে একটি একক প্রতিক্রিয়া মুছে দেয়৷
getConfirmationMessage() String ফর্মের নিশ্চিতকরণ বার্তা পায়।
getCustomClosedFormMessage() String ফর্মটি প্রতিক্রিয়া গ্রহণ না করলে প্রদর্শিত কাস্টম বার্তাটি পায়, অথবা কোনও কাস্টম বার্তা সেট না থাকলে একটি খালি স্ট্রিং পায়৷
getDescription() String ফর্মের বিবরণ পায়।
getDestinationId() String ফর্মের প্রতিক্রিয়া গন্তব্যের আইডি পায়।
getDestinationType() DestinationType ফর্মের প্রতিক্রিয়া গন্তব্যের ধরন পায়।
getEditUrl() String ফর্মের সম্পাদনা মোড অ্যাক্সেস করতে ব্যবহার করা যেতে পারে এমন URL পায়৷
getEditors() User[] এই Form জন্য সম্পাদকদের তালিকা পায়।
getId() String ফর্মের আইডি পায়।
getItemById(id) Item একটি প্রদত্ত আইডি দিয়ে আইটেম পায়.
getItems() Item[] ফর্ম সব আইটেম একটি অ্যারে পায়.
getItems(itemType) Item[] একটি প্রদত্ত ধরনের সমস্ত আইটেমের একটি অ্যারে পায়।
getPublishedUrl() String ফর্মের প্রতিক্রিয়া জানাতে ব্যবহার করা যেতে পারে এমন URL পায়৷
getResponse(responseId) FormResponse এর প্রতিক্রিয়া আইডির উপর ভিত্তি করে একটি একক ফর্ম প্রতিক্রিয়া পায়৷
getResponses() FormResponse[] ফর্মের সমস্ত প্রতিক্রিয়াগুলির একটি অ্যারে পায়৷
getResponses(timestamp) FormResponse[] একটি প্রদত্ত তারিখ এবং সময়ের পরে ফর্মের সমস্ত প্রতিক্রিয়াগুলির একটি অ্যারে পায়৷
getShuffleQuestions() Boolean ফর্মের প্রতিটি পৃষ্ঠায় প্রশ্নের ক্রম এলোমেলো করা হয়েছে কিনা তা নির্ধারণ করে।
getSummaryUrl() String ফর্মের প্রতিক্রিয়াগুলির একটি সারাংশ দেখতে ব্যবহার করা যেতে পারে এমন URL পায়৷
getTitle() String ফর্মের শিরোনাম পায়।
hasLimitOneResponsePerUser() Boolean ফর্মটি প্রতি উত্তরদাতাকে শুধুমাত্র একটি প্রতিক্রিয়ার অনুমতি দেয় কিনা তা নির্ধারণ করে।
hasProgressBar() Boolean ফর্মটি একটি অগ্রগতি বার প্রদর্শন করে কিনা তা নির্ধারণ করে।
hasRespondAgainLink() Boolean একজন উত্তরদাতা ফর্মটি পূরণ করার পরে ফর্মটি অন্য প্রতিক্রিয়া জমা দেওয়ার জন্য একটি লিঙ্ক প্রদর্শন করে কিনা তা নির্ধারণ করে৷
isAcceptingResponses() Boolean ফর্মটি বর্তমানে প্রতিক্রিয়াগুলি গ্রহণ করছে কিনা তা নির্ধারণ করে৷
isPublishingSummary() Boolean একজন উত্তরদাতা ফর্মটি সম্পূর্ণ করার পরে প্রতিক্রিয়াগুলির সারাংশ দেখার জন্য ফর্মটি একটি লিঙ্ক প্রদর্শন করে কিনা তা নির্ধারণ করে৷
isQuiz() Boolean ফর্মটি একটি কুইজ কিনা তা নির্ধারণ করে৷
moveItem(from, to) Item ফর্মের সমস্ত আইটেমগুলির মধ্যে একটি প্রদত্ত সূচকে একটি আইটেমকে অন্য প্রদত্ত সূচকে স্থানান্তরিত করে।
moveItem(item, toIndex) Item ফর্মের সমস্ত আইটেমের মধ্যে একটি প্রদত্ত আইটেমকে একটি প্রদত্ত সূচীতে স্থানান্তর করে।
removeDestination() Form ফর্মটিকে তার বর্তমান প্রতিক্রিয়া গন্তব্য থেকে লিঙ্কমুক্ত করে৷
removeEditor(emailAddress) Form প্রদত্ত ব্যবহারকারীকে Form সম্পাদকদের তালিকা থেকে সরিয়ে দেয়।
removeEditor(user) Form প্রদত্ত ব্যবহারকারীকে Form সম্পাদকদের তালিকা থেকে সরিয়ে দেয়।
requiresLogin() Boolean ফর্মটির জন্য উত্তরদাতাদের প্রতিক্রিয়া দেওয়ার আগে একই ডোমেনে বা একটি সাবডোমেনে একটি অ্যাকাউন্টে লগ ইন করতে হবে কিনা তা নির্ধারণ করে৷
setAcceptingResponses(enabled) Form ফর্মটি বর্তমানে প্রতিক্রিয়াগুলি গ্রহণ করছে কিনা তা সেট করে৷
setAllowResponseEdits(enabled) Form ফর্মটি জমা দেওয়ার পরে একটি প্রতিক্রিয়া সম্পাদনা করার জন্য একটি লিঙ্ক প্রদর্শন করে কিনা তা সেট করে।
setCollectEmail(collect) Form ফর্মটি উত্তরদাতাদের ইমেল ঠিকানা সংগ্রহ করে কিনা তা সেট করে।
setConfirmationMessage(message) Form ফর্মের নিশ্চিতকরণ বার্তা সেট করে।
setCustomClosedFormMessage(message) Form ফর্মটি প্রতিক্রিয়া গ্রহণ না করলে প্রদর্শনের জন্য বার্তা সেট করে।
setDescription(description) Form ফর্মের বিবরণ সেট করে।
setDestination(type, id) Form গন্তব্য সেট করে যেখানে ফর্ম প্রতিক্রিয়া সংরক্ষিত হয়।
setIsQuiz(enabled) Form ফর্মটি একটি কুইজ কিনা তা সেট করে৷
setLimitOneResponsePerUser(enabled) Form ফর্ম প্রতি উত্তরদাতা শুধুমাত্র একটি প্রতিক্রিয়া অনুমতি দেয় কিনা সেট করে।
setProgressBar(enabled) Form ফর্মটিতে একটি অগ্রগতি বার আছে কিনা তা সেট করে।
setPublishingSummary(enabled) Form উত্তরদাতা ফর্ম জমা দেওয়ার পরে ফর্মটি প্রতিক্রিয়াগুলির সারাংশ দেখার জন্য একটি লিঙ্ক প্রদর্শন করে কিনা তা সেট করে।
setRequireLogin(requireLogin) Form ফর্মটির জন্য উত্তরদাতাদের প্রতিক্রিয়া দেওয়ার আগে একই ডোমেনে বা একটি সাবডোমেনে একটি অ্যাকাউন্টে লগ ইন করতে হবে কিনা তা সেট করে৷
setShowLinkToRespondAgain(enabled) Form উত্তরদাতা ফর্মটি পূরণ করার পরে ফর্মটি অন্য প্রতিক্রিয়া জমা দেওয়ার জন্য একটি লিঙ্ক প্রদর্শন করে কিনা তা সেট করে।
setShuffleQuestions(shuffle) Form ফর্মের প্রতিটি পৃষ্ঠায় প্রশ্নের ক্রম এলোমেলো করা হয়েছে কিনা তা সেট করে।
setTitle(title) Form ফর্মের শিরোনাম সেট করে।
shortenFormUrl(url) String একটি ফর্মের জন্য একটি দীর্ঘ URL একটি ছোট URL এ রূপান্তর করে৷
submitGrades(responses) Form প্রদত্ত ফর্ম প্রতিক্রিয়াগুলির জন্য গ্রেড জমা দেয়৷

বিস্তারিত ডকুমেন্টেশন

addCheckboxGridItem()

কলাম এবং সারিগুলির একটি গ্রিড হিসাবে উপস্থাপিত একটি নতুন প্রশ্ন আইটেম যুক্ত করে, যা উত্তরদাতাকে চেকবক্সগুলির একটি ক্রম থেকে প্রতি সারিতে একাধিক পছন্দ নির্বাচন করতে দেয়৷

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Adds a checkbox grid item.
const item = form.addCheckboxGridItem();

// Sets the title 'Where did you celebrate New Year's?'
item.setTitle('Where did you celebrate New Year's?');

// Sets the grid's rows and columns.
item.setRows(['New York', 'San Francisco', 'London'])
  .setColumns(['2014', '2015', '2016', '2017']);

প্রত্যাবর্তন

CheckboxGridItem — সদ্য তৈরি আইটেম।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

addCheckboxItem()

একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে এক বা একাধিক চেকবক্স নির্বাচন করতে দেয়, সেইসাথে একটি ঐচ্ছিক "অন্যান্য" ক্ষেত্র।

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Adds a checkbox item.
const item = form.addCheckboxItem();

// Sets the title of the checkbox item to 'Do you prefer cats or dogs?'
item.setTitle('Do you prefer cats or dogs?');

// Sets the choices.
item.setChoiceValues(['Cats', 'Dogs']);

প্রত্যাবর্তন

CheckboxItem - নতুন তৈরি আইটেম।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

addDateItem()

একটি নতুন প্রশ্ন আইটেম যোগ করে যা উত্তরদাতাকে একটি তারিখ নির্দেশ করতে দেয়।

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Adds a date item.
const item = form.addDateItem();

// Sets the title to 'When were you born?'
item.setTitle('When were you born?');

// Sets the description for the date item.
item.setHelpText('Some helper text.');

প্রত্যাবর্তন

DateItem - নতুন তৈরি আইটেম।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

addDateTimeItem()

একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে একটি তারিখ এবং সময় নির্দেশ করতে দেয়৷

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Adds a question with date and time inputs.
const item = form.addDateTimeItem();

// Sets the title to 'When were you born?'
item.setTitle('When were you born?');

// Sets the question as required.
item.setRequired(true);

প্রত্যাবর্তন

DateTimeItem — নতুন তৈরি আইটেম।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

addDurationItem()

একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে একটি দৈর্ঘ্য নির্দেশ করতে দেয়।

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Adds a question with a duration input.
const item = form.addDurationItem();

// Sets the title to 'How long can you hold your breath?'
item.setTitle('How long can you hold your breath?');

// Sets the question as required.
item.setRequired(true);

প্রত্যাবর্তন

DurationItem - নতুন তৈরি আইটেম।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

addEditor(emailAddress)

প্রদত্ত ব্যবহারকারীকে Form সম্পাদকদের তালিকায় যুক্ত করে। যদি ব্যবহারকারী ইতিমধ্যেই দর্শকদের তালিকায় থাকে, তাহলে এই পদ্ধতি ব্যবহারকারীকে দর্শকদের তালিকা থেকে সরিয়ে দেয়।

পরামিতি

নাম টাইপ বর্ণনা
emailAddress String ব্যবহারকারীর ইমেইল ঠিকানা যোগ করতে হবে।

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

addEditor(user)

প্রদত্ত ব্যবহারকারীকে Form সম্পাদকদের তালিকায় যুক্ত করে। যদি ব্যবহারকারী ইতিমধ্যেই দর্শকদের তালিকায় থাকে, তাহলে এই পদ্ধতি ব্যবহারকারীকে দর্শকদের তালিকা থেকে সরিয়ে দেয়।

পরামিতি

নাম টাইপ বর্ণনা
user User যোগ করার জন্য ব্যবহারকারীর একটি উপস্থাপনা।

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

addEditors(emailAddresses)

Form জন্য সম্পাদকদের তালিকায় ব্যবহারকারীদের প্রদত্ত অ্যারে যোগ করে। যদি ব্যবহারকারীদের মধ্যে কেউ ইতিমধ্যেই দর্শকদের তালিকায় থাকে তবে এই পদ্ধতিটি তাদের দর্শকদের তালিকা থেকে বের করে দেয়।

পরামিতি

নাম টাইপ বর্ণনা
emailAddresses String[] ব্যবহারকারীদের ইমেল ঠিকানা যোগ করার জন্য একটি অ্যারে.

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

addGridItem()

কলাম এবং সারিগুলির একটি গ্রিড হিসাবে উপস্থাপিত একটি নতুন প্রশ্ন আইটেম যুক্ত করে, যা উত্তরদাতাকে রেডিও বোতামগুলির একটি ক্রম থেকে প্রতি সারিতে একটি পছন্দ নির্বাচন করতে দেয়৷

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Adds a multiple choice grid.
const item = form.addGridItem();

// Sets the title to 'Rate your interests.'
item.setTitle('Rate your interests');

// Sets the grid's rows and columns.
item.setRows(['Cars', 'Computers', 'Celebrities'])
  .setColumns(['Boring', 'So-so', 'Interesting']);

প্রত্যাবর্তন

GridItem — নতুন তৈরি আইটেম।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

addImageItem()

একটি নতুন লেআউট আইটেম যুক্ত করে যা একটি চিত্র প্রদর্শন করে।

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Adds an image item.
const item = form.addImageItem();

// Gets the Google icon to use as the image.
const img = UrlFetchApp.fetch('https://fonts.gstatic.com/s/i/productlogos/googleg/v6/web-24dp/logo_googleg_color_1x_web_24dp.png');

// Sets the image, title, and description for the item.
item.setTitle('Google icon').setHelpText('Google icon').setImage(img);

প্রত্যাবর্তন

ImageItem — নতুন তৈরি আইটেম.

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

addListItem()

একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে একটি ড্রপডাউন তালিকা থেকে একটি পছন্দ নির্বাচন করতে দেয়৷

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Adds a dropdown list to the form.
const item = form.addListItem();

// Sets the title to 'Do you prefer cats or dogs?'
item.setTitle('Do you prefer cats or dogs?');

// Sets the description to 'This is description text...'
item.setHelpText('This is description text...');

// Creates and adds choices to the dropdown list.
item.setChoices([
  item.createChoice('dog'),
  item.createChoice('cat')
]);

প্রত্যাবর্তন

ListItem - নতুন তৈরি আইটেম।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

addMultipleChoiceItem()

একটি নতুন প্রশ্ন আইটেম যোগ করে যা উত্তরদাতাকে রেডিও বোতামের তালিকা বা একটি ঐচ্ছিক "অন্য" ক্ষেত্র থেকে একটি পছন্দ নির্বাচন করতে দেয়৷

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Adds a multiple choice item to the form.
const item = form.addMultipleChoiceItem();

// Sets the title.
item.setTitle('What is your favorite ice cream flavor?');

// Creates some choice items.
const vanilla = item.createChoice('vanilla');
const chocolate = item.createChoice('chocolate');
const strawberry = item.createChoice('strawberry');

// Sets the choices.
item.setChoices([vanilla, chocolate, strawberry]);

প্রত্যাবর্তন

MultipleChoiceItem — নতুন তৈরি আইটেম।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

addPageBreakItem()

একটি নতুন লেআউট আইটেম যোগ করে যা একটি পৃষ্ঠার শুরুকে চিহ্নিত করে।

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Adds page break items to create a second and third page for the form.
const pageTwo = form.addPageBreakItem();
const pageThree = form.addPageBreakItem();

// Sets the titles for the pages.
pageTwo.setTitle('Page two');
pageThree.setTitle('Page three');

// Upon completion of the first page, sets the form to navigate to the third page.
pageTwo.setGoToPage(pageThree);

// Upon completion of the second page, sets the form to navigate back to the first page.
pageThree.setGoToPage(FormApp.PageNavigationType.RESTART);

প্রত্যাবর্তন

PageBreakItem — সদ্য তৈরি আইটেম।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

addParagraphTextItem()

একটি নতুন প্রশ্ন আইটেম যোগ করে যা উত্তরদাতাকে পাঠ্যের একটি ব্লক প্রবেশ করতে দেয়৷

// Opens the form by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Adds the paragraph text item.
const item = form.addParagraphTextItem();

// Sets the title to 'What is your address?'
item.setTitle('What is your address?');

প্রত্যাবর্তন

ParagraphTextItem - নতুন তৈরি আইটেম।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

addScaleItem()

একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে রেডিও বোতামগুলির একটি সংখ্যাযুক্ত ক্রম থেকে একটি বিকল্প বেছে নিতে দেয়৷

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Adds the scale item.
const item = form.addScaleItem();

// Sets the title of the scale item to 'Choose a number.'
item.setTitle('Choose a number');

// Sets the scale to 1-5.
item.setBounds(1, 5);

// Sets the label for the lower and upper bounds.
item.setLabels('Lowest', 'Highest');

প্রত্যাবর্তন

ScaleItem - নতুন তৈরি আইটেম।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

addSectionHeaderItem()

একটি নতুন লেআউট আইটেম যুক্ত করে যা দৃশ্যত একটি বিভাগের শুরুকে নির্দেশ করে৷

 // Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Adds the section heading item.
const item = form.addSectionHeaderItem();

// Sets the title to 'Title of new section.'
item.setTitle('Title of new section');

// Sets the description.
item.setHelpText('Description of new section');

প্রত্যাবর্তন

SectionHeaderItem — নতুন তৈরি আইটেম।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

addTextItem()

একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে পাঠ্যের একটি লাইন প্রবেশ করতে দেয়।

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Adds a single-line text item.
const item = form.addTextItem();

// Sets the title to 'What is your name?'
item.setTitle('What is your name?');

প্রত্যাবর্তন

TextItem - নতুন তৈরি আইটেম।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

addTimeItem()

একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে দিনের একটি সময় নির্দেশ করতে দেয়।

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Adds a question with a time input.
const item = form.addTimeItem();

// Sets the title to 'What time do you usually wake up in the morning?'
item.setTitle('What time do you usually wake up in the morning?');

প্রত্যাবর্তন

TimeItem - নতুন তৈরি আইটেম।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

addVideoItem()

একটি নতুন লেআউট আইটেম যুক্ত করে যা একটি ভিডিও প্রদর্শন করে।

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Adds a video item.
const item = form.addVideoItem();

// Sets the title, description, and video.
item.setTitle('YouTube video')
  .setHelpText('Send content automatically via Google Sheets and Apps Script')
  .setVideoUrl('https://youtu.be/xxgQr-jSu9o');

// Sets the alignment to the center.
item.setAlignment(FormApp.Alignment.CENTER);

প্রত্যাবর্তন

VideoItem - নতুন তৈরি আইটেম।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

canEditResponse()

ফর্মটি জমা দেওয়ার পরে একটি প্রতিক্রিয়া সম্পাদনা করার জন্য একটি লিঙ্ক প্রদর্শন করে কিনা তা নির্ধারণ করে৷

এই সেটিং নির্বিশেষে, পদ্ধতি FormResponse.getEditResponseUrl() একজন স্ক্রিপ্ট লেখককে অনুমতি দেয় যার ফর্মটিতে সম্পাদনা করার অ্যাক্সেস রয়েছে এমন একটি URL তৈরি করতে যা একটি প্রতিক্রিয়া সম্পাদনা করতে ব্যবহার করা যেতে পারে৷

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Checks if the form displays a link to edit a response after submitting it.
// The default is false. To let people edit their responses, use
// form.setAllowResponseEdits(true).
const edit = form.canEditResponse();

// If the form doesn't let people edit responses, logs false to the console.
console.log(edit);

প্রত্যাবর্তন

Booleantrue যদি ফর্মটি একটি "আপনার প্রতিক্রিয়া সম্পাদনা করুন" লিঙ্ক প্রদর্শন করে; false যদি না হয়।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

collectsEmail()

ফর্মটি উত্তরদাতাদের ইমেল ঠিকানা সংগ্রহ করে কিনা তা নির্ধারণ করে।

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Sets the form to not collect respondents' email addresses.
form.setCollectEmail(false);

// Checks whether the form collects respondents' email addresses and logs it to the console.
const bool = form.collectsEmail();

console.log(bool);

প্রত্যাবর্তন

Booleantrue যদি ফর্মটি ইমেল ঠিকানা সংগ্রহ করে; false যদি না হয়।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

createResponse()

ফর্মে একটি নতুন প্রতিক্রিয়া তৈরি করে। একটি প্রশ্নের উত্তর দিতে, আইটেম থেকে একটি ItemResponse তৈরি করুন, তারপর FormResponse.withItemResponse(response) কল করে এই ফর্ম প্রতিক্রিয়ার সাথে এটি সংযুক্ত করুন। একত্রিত প্রতিক্রিয়া সংরক্ষণ করতে, FormResponse.submit() কল করুন।

প্রত্যাবর্তন

FormResponse — নতুন তৈরি ফর্ম প্রতিক্রিয়া।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

deleteAllResponses()

ফর্মের প্রতিক্রিয়া স্টোর থেকে জমা দেওয়া সমস্ত প্রতিক্রিয়া মুছে দেয়৷ এই পদ্ধতিটি একটি বাহ্যিক প্রতিক্রিয়া গন্তব্যে (যেমন স্প্রেডশীট) সংরক্ষিত প্রতিক্রিয়াগুলির অনুলিপি মুছে দেয় না, তবে ফর্মের সারাংশ দৃশ্যটি পরিষ্কার করে।

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

deleteItem(index)

ফর্মের সমস্ত আইটেমের মধ্যে একটি প্রদত্ত সূচীতে আইটেমটি মুছে দেয়। প্রদত্ত সূচীতে কোনো আইটেম বিদ্যমান না থাকলে একটি স্ক্রিপ্টিং ব্যতিক্রম নিক্ষেপ করে।

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Gets all the items from the form.
const items = form.getItems();

// Finds the index of a paragraph text item and deletes it by the item's index.
const index = items.findIndex(item => item.getType() === FormApp.ItemType.PARAGRAPH_TEXT);
if (index !== -1) {
  form.deleteItem(index);
}

পরামিতি

নাম টাইপ বর্ণনা
index Integer ফর্মের সমস্ত আইটেমের মধ্যে আইটেমের সূচক।

নিক্ষেপ করে

Error — যদি প্রদত্ত সূচকে কোনো আইটেম বিদ্যমান না থাকে

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

deleteItem(item)

প্রদত্ত আইটেম মুছে দেয়। আইটেম ইতিমধ্যে মুছে ফেলা হয়েছে যদি একটি স্ক্রিপ্টিং ব্যতিক্রম নিক্ষেপ.

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Gets all of the items from the form.
const items = form.getItems();

// Finds a paragraph text item and deletes it.
const item = items.find(item => item.getType() === FormApp.ItemType.PARAGRAPH_TEXT);
if (item) {
  form.deleteItem(item);
}

পরামিতি

নাম টাইপ বর্ণনা
item Item আইটেম মুছে ফেলা হবে.

নিক্ষেপ করে

Error — যদি আইটেমটি আকারে বিদ্যমান না থাকে

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

deleteResponse(responseId)

ফর্মের প্রতিক্রিয়া দোকান থেকে একটি একক প্রতিক্রিয়া মুছে দেয়৷ এই পদ্ধতিটি একটি বাহ্যিক প্রতিক্রিয়া গন্তব্যে (যেমন একটি স্প্রেডশীট) সংরক্ষিত প্রতিক্রিয়াগুলির অনুলিপিগুলিকে মুছে দেয় না, তবে ফর্মের সারাংশ দৃশ্য থেকে প্রতিক্রিয়াগুলি সরিয়ে দেয়৷ প্রতিক্রিয়া ID FormResponse.getId() দিয়ে পুনরুদ্ধার করা যেতে পারে।

পরামিতি

নাম টাইপ বর্ণনা
responseId String ডিলিট করার জন্য ফর্মের উত্তরের আইডি।

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getConfirmationMessage()

ফর্মের নিশ্চিতকরণ বার্তা পায়।

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Sets the confirmation message to display after someone submits the form.
form.setConfirmationMessage('You successfully submitted the form.');

// Gets the confirmation message and logs it to the console.
const message = form.getConfirmationMessage();

console.log(message);

প্রত্যাবর্তন

String - ফর্মের নিশ্চিতকরণ বার্তা।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getCustomClosedFormMessage()

ফর্মটি প্রতিক্রিয়া গ্রহণ না করলে প্রদর্শিত কাস্টম বার্তাটি পায়, অথবা কোনও কাস্টম বার্তা সেট না থাকলে একটি খালি স্ট্রিং পায়৷

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Sets a custom closed form message to display to the user when the form
// no longer accepts responses.
form.setCustomClosedFormMessage('The form is no longer accepting responses.');

// Gets the custom message set for the form and logs it to the console.
const message = form.getCustomClosedFormMessage();

console.log(message);

প্রত্যাবর্তন

String — ফর্মটি প্রতিক্রিয়া গ্রহণ না করলে প্রদর্শনের জন্য কাস্টম বার্তা, অথবা কোনো কাস্টম বার্তা সেট না থাকলে একটি খালি স্ট্রিং।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getDescription()

ফর্মের বিবরণ পায়।

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Sets the form description.
form.setDescription('This is the form description.');

// Gets the form description and logs it to the console.
const description = form.getDescription();

console.log(description);

প্রত্যাবর্তন

String - ফর্মের বিবরণ।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getDestinationId()

ফর্মের প্রতিক্রিয়া গন্তব্যের আইডি পায়।

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Creates a spreadsheet to use as the response destination.
const ss = SpreadsheetApp.create('Test_Spreadsheet');

// Updates the form's response destination.
form.setDestination(FormApp.DestinationType.SPREADSHEET, ss.getId());

// Gets the ID of the form's response destination and logs it to the console.
const destinationId = form.getDestinationId();

console.log(destinationId);

প্রত্যাবর্তন

String — ফর্মের প্রতিক্রিয়া গন্তব্যের আইডি।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getDestinationType()

ফর্মের প্রতিক্রিয়া গন্তব্যের ধরন পায়।

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc1234556/edit');

// Gets the type of the form's response destination and logs it to the console.
const destinationType = form.getDestinationType().name();

console.log(destinationType);

প্রত্যাবর্তন

DestinationType — ফর্মের প্রতিক্রিয়া গন্তব্যের ধরন।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getEditUrl()

ফর্মের সম্পাদনা মোড অ্যাক্সেস করতে ব্যবহার করা যেতে পারে এমন URL পায়৷

// Opens the form by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Gets the URL that accesses the form's edit mode and logs it to the console.
const url = form.getEditUrl();

console.log(url);

প্রত্যাবর্তন

String — ফর্ম সম্পাদনা করার URL।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getEditors()

এই Form জন্য সম্পাদকদের তালিকা পায়।

প্রত্যাবর্তন

User[] — সম্পাদনার অনুমতি সহ ব্যবহারকারীদের একটি অ্যারে।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getId()

ফর্মের আইডি পায়।

// Opens the form by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Gets the ID of the form and logs it to the console.
const id = form.getId();

console.log(id);

প্রত্যাবর্তন

String - ফর্মের আইডি।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getItemById(id)

একটি প্রদত্ত আইডি দিয়ে আইটেম পায়. যদি আইডি ফর্মের একটি আইটেমের সাথে সঙ্গতি না করে তাহলে null রিটার্ন করে।

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Gets the ID of the first item on the form.
const itemId = form.getItems()[0].getId();

// Gets the item from the ID.
const item = form.getItemById(itemId);

// Gets the name of the item type and logs it to the console.
const type = item.getType().name();

console.log(type);

পরামিতি

নাম টাইপ বর্ণনা
id Integer আইটেম এর আইডি.

প্রত্যাবর্তন

Item - প্রদত্ত আইডি সহ আইটেম, বা null যদি আইটেমটি আকারে বিদ্যমান না থাকে।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getItems()

ফর্ম সব আইটেম একটি অ্যারে পায়.

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Gets the list of items in the form.
const items = form.getItems();

// Gets the type for each item and logs them to the console.
const types = items.map((item) => item.getType().name());

console.log(types);

প্রত্যাবর্তন

Item[] — ফর্মের সমস্ত আইটেমের একটি অ্যারে।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getItems(itemType)

একটি প্রদত্ত ধরনের সমস্ত আইটেমের একটি অ্যারে পায়।

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Gets a list of all checkbox items on the form.
const items = form.getItems(FormApp.ItemType.CHECKBOX);

// Gets the title of each checkbox item and logs them to the console.
const checkboxItemsTitle = items.map((item) => item.asCheckboxItem().getTitle());
console.log(checkboxItemsTitle);

পরামিতি

নাম টাইপ বর্ণনা
itemType ItemType পুনরুদ্ধার করার জন্য আইটেমগুলির ধরন৷

প্রত্যাবর্তন

Item[] — এই ধরনের সমস্ত আইটেমের একটি অ্যারে।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getPublishedUrl()

ফর্মের প্রতিক্রিয়া জানাতে ব্যবহার করা যেতে পারে এমন URL পায়৷

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Gets the URL to respond to the form and logs it to the console.
const url = form.getPublishedUrl();
console.log(url);

প্রত্যাবর্তন

String — ফর্মে সাড়া দেওয়ার URL।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getResponse(responseId)

এর প্রতিক্রিয়া আইডির উপর ভিত্তি করে একটি একক ফর্ম প্রতিক্রিয়া পায়৷ প্রতিক্রিয়া আইডিগুলি FormResponse.getId() থেকে পুনরুদ্ধার করা যেতে পারে।

পরামিতি

নাম টাইপ বর্ণনা
responseId String ফর্ম প্রতিক্রিয়া জন্য আইডি.

প্রত্যাবর্তন

FormResponse - ফর্ম প্রতিক্রিয়া.

নিক্ষেপ করে

Error — যদি প্রতিক্রিয়া বিদ্যমান না থাকে

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getResponses()

ফর্মের সমস্ত প্রতিক্রিয়াগুলির একটি অ্যারে পায়৷

প্রত্যাবর্তন

FormResponse[] — ফর্মের সমস্ত প্রতিক্রিয়ার একটি অ্যারে।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getResponses(timestamp)

একটি প্রদত্ত তারিখ এবং সময়ের পরে ফর্মের সমস্ত প্রতিক্রিয়াগুলির একটি অ্যারে পায়৷

পরামিতি

নাম টাইপ বর্ণনা
timestamp Date প্রথমতম তারিখ এবং সময় যার জন্য ফর্ম প্রতিক্রিয়াগুলি ফেরত দেওয়া উচিত৷

প্রত্যাবর্তন

FormResponse[] — ফর্ম প্রতিক্রিয়ার তালিকা।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getShuffleQuestions()

ফর্মের প্রতিটি পৃষ্ঠায় প্রশ্নের ক্রম এলোমেলো করা হয়েছে কিনা তা নির্ধারণ করে।

প্রত্যাবর্তন

Booleantrue যদি ফর্মের প্রতিটি পৃষ্ঠায় প্রশ্নের ক্রম এলোমেলো করা হয়; false না হলে।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getSummaryUrl()

ফর্মের প্রতিক্রিয়াগুলির একটি সারাংশ দেখতে ব্যবহার করা যেতে পারে এমন URL পায়৷ যদি না setPublishingSummary(enabled) true তে সেট করা হয়, শুধুমাত্র ফর্মটিতে সম্পাদনা করার অনুমতি আছে এমন ব্যবহারকারীরাই URL অ্যাক্সেস করতে পারবেন।

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// Opens the form by its URL.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Gets the URL to view a summary of the form's responses and logs it to the console.
const url = form.getSummaryUrl();
console.log(url);

প্রত্যাবর্তন

String — প্রতিক্রিয়াগুলির একটি সারাংশ দেখার URL।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getTitle()

ফর্মের শিরোনাম পায়।

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Sets the title of the form to 'For_Testing.'
form.setTitle('For_Testing');

// Gets the title of the form and logs it to the console.
const title = form.getTitle();
console.log(title);

প্রত্যাবর্তন

String - ফর্মের শিরোনাম।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

hasLimitOneResponsePerUser()

ফর্মটি প্রতি উত্তরদাতাকে শুধুমাত্র একটি প্রতিক্রিয়ার অনুমতি দেয় কিনা তা নির্ধারণ করে। মানটি true হলে, স্ক্রিপ্টটি মোটেও ফর্ম প্রতিক্রিয়া জমা দিতে পারে না।

প্রত্যাবর্তন

Booleantrue যদি ফর্মটি প্রতি উত্তরদাতা শুধুমাত্র একটি প্রতিক্রিয়ার অনুমতি দেয়; false না হলে।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

hasProgressBar()

ফর্মটি একটি অগ্রগতি বার প্রদর্শন করে কিনা তা নির্ধারণ করে।

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// Opens the form by its URL.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Displays the progress bar on the form.
form.setProgressBar(true);

// Checks if the form displays a progress bar and logs it to the console.
console.log(form.hasProgressBar());

প্রত্যাবর্তন

Booleantrue যদি ফর্মটি একটি অগ্রগতি বার প্রদর্শন করে; false যদি না হয়।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

একজন উত্তরদাতা ফর্মটি পূরণ করার পরে ফর্মটি অন্য প্রতিক্রিয়া জমা দেওয়ার জন্য একটি লিঙ্ক প্রদর্শন করে কিনা তা নির্ধারণ করে৷

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Sets the form to display a link to submit another
// response after someone submits the form.
form.setShowLinkToRespondAgain(true);

// Checks if the form displays a 'Submit another response' link and logs it to the console.
console.log(form.hasRespondAgainLink());

প্রত্যাবর্তন

Booleantrue যদি ফর্মটি একটি "অন্য প্রতিক্রিয়া জমা দিন" লিঙ্ক প্রদর্শন করে; false যদি না হয়।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

isAcceptingResponses()

ফর্মটি বর্তমানে প্রতিক্রিয়াগুলি গ্রহণ করছে কিনা তা নির্ধারণ করে৷

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Sets the form to accept responses.
form.setAcceptingResponses(true);

// Checks if the form is accepting responses or not and logs it to the console.
const accepting = form.isAcceptingResponses();
console.log(accepting);

প্রত্যাবর্তন

Booleantrue যদি ফর্মটি প্রতিক্রিয়া গ্রহণ করে; false যদি না হয়।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

isPublishingSummary()

একজন উত্তরদাতা ফর্মটি সম্পূর্ণ করার পরে প্রতিক্রিয়াগুলির সারাংশ দেখার জন্য ফর্মটি একটি লিঙ্ক প্রদর্শন করে কিনা তা নির্ধারণ করে৷

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Sets the form to display a link to a summary of
// the responses after someone submits the form.
form.setPublishingSummary(true);

// Checks if the form displays a "See previous responses" link and logs it to the console.
const publishingLink = form.isPublishingSummary();
console.log(publishingLink);

প্রত্যাবর্তন

Booleantrue যদি ফর্মটি একটি "আগের প্রতিক্রিয়া দেখুন" লিঙ্ক প্রদর্শন করে; false যদি না হয়।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

isQuiz()

ফর্মটি একটি কুইজ কিনা তা নির্ধারণ করে৷

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Sets the form as a quiz.
form.setIsQuiz(true);

// Checks if the form is a quiz or not and logs it to the console.
console.log(form.isQuiz());

প্রত্যাবর্তন

Booleantrue যদি ফর্মটি প্রতিক্রিয়া গ্রহণ করে; false যদি না হয়।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

moveItem(from, to)

ফর্মের সমস্ত আইটেমগুলির মধ্যে একটি প্রদত্ত সূচকে একটি আইটেমকে অন্য প্রদত্ত সূচকে স্থানান্তরিত করে। to সীমার বাইরে হলে একটি স্ক্রিপ্টিং ব্যতিক্রম নিক্ষেপ করে।

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Moves the first item to be the last item.
form.moveItem(0, form.getItems().length - 1);

পরামিতি

নাম টাইপ বর্ণনা
from Integer ফর্মের সমস্ত আইটেমের মধ্যে আইটেমের বর্তমান সূচক।
to Integer ফর্মের সমস্ত আইটেমের মধ্যে আইটেমের জন্য নতুন সূচক।

প্রত্যাবর্তন

Item - যে আইটেমটি সরানো হয়েছিল।

নিক্ষেপ করে

Error — যদি উভয় সূচক সীমার বাইরে হয়।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

moveItem(item, toIndex)

ফর্মের সমস্ত আইটেমের মধ্যে একটি প্রদত্ত আইটেমকে একটি প্রদত্ত সূচীতে স্থানান্তর করে। প্রদত্ত সূচকটি সীমার বাইরে থাকলে একটি স্ক্রিপ্টিং ব্যতিক্রম নিক্ষেপ করে।

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Gets the first item.
const item = form.getItems()[0];

// Moves the item to be the last item.
form.moveItem(item, form.getItems().length - 1);

পরামিতি

নাম টাইপ বর্ণনা
item Item সরানো আইটেম.
toIndex Integer ফর্মের সমস্ত আইটেমের মধ্যে আইটেমের জন্য নতুন সূচক।

প্রত্যাবর্তন

Item - যে আইটেমটি সরানো হয়েছিল।

নিক্ষেপ করে

Error — যদি সূচকটি সীমার বাইরে থাকে।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

removeDestination()

ফর্মটিকে তার বর্তমান প্রতিক্রিয়া গন্তব্য থেকে লিঙ্কমুক্ত করে৷ লিঙ্কমুক্ত পূর্ববর্তী গন্তব্যটি এখনও পূর্ববর্তী সমস্ত প্রতিক্রিয়াগুলির একটি অনুলিপি ধরে রেখেছে৷ সমস্ত ফর্ম, যার মধ্যে স্পষ্টভাবে একটি গন্তব্য সেট নেই, ফর্মের প্রতিক্রিয়া স্টোরে প্রতিক্রিয়াগুলির একটি অনুলিপি সংরক্ষণ করুন ৷ যদি ফর্মটির বর্তমানে একটি প্রতিক্রিয়া গন্তব্য না থাকে তবে এই পদ্ধতির কোন প্রভাব নেই।

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Opens a spreadsheet to use for the response destination.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl('https://docs.google.com/spreadsheets/d/abc123456/edit');

// Updates the form's response destination to the spreadsheet.
form.setDestination(FormApp.DestinationType.SPREADSHEET, ss.getId());

// Unlinks the form from the spreadsheet.
form.removeDestination();

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

removeEditor(emailAddress)

প্রদত্ত ব্যবহারকারীকে Form সম্পাদকদের তালিকা থেকে সরিয়ে দেয়। এই পদ্ধতিটি ব্যবহারকারীদের Form অ্যাক্সেস করতে বাধা দেয় না যদি তারা সাধারণ অ্যাক্সেস রয়েছে এমন ব্যবহারকারীদের একটি শ্রেণীর অন্তর্ভুক্ত—উদাহরণস্বরূপ, যদি Form ব্যবহারকারীর সম্পূর্ণ ডোমেনের সাথে ভাগ করা হয়, অথবা যদি Form ব্যবহারকারীর একটি শেয়ার্ড ড্রাইভে থাকে অ্যাক্সেস করতে পারেন।

ড্রাইভ ফাইলগুলির জন্য, এটি ব্যবহারকারীকে দর্শকদের তালিকা থেকেও সরিয়ে দেয়৷

পরামিতি

নাম টাইপ বর্ণনা
emailAddress String ব্যবহারকারীর ইমেইল ঠিকানা অপসারণ.

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

removeEditor(user)

প্রদত্ত ব্যবহারকারীকে Form সম্পাদকদের তালিকা থেকে সরিয়ে দেয়। এই পদ্ধতিটি ব্যবহারকারীদের Form অ্যাক্সেস করতে বাধা দেয় না যদি তারা সাধারণ অ্যাক্সেস রয়েছে এমন ব্যবহারকারীদের একটি শ্রেণীর অন্তর্ভুক্ত—উদাহরণস্বরূপ, যদি Form ব্যবহারকারীর সম্পূর্ণ ডোমেনের সাথে ভাগ করা হয়, অথবা যদি Form ব্যবহারকারীর একটি শেয়ার্ড ড্রাইভে থাকে অ্যাক্সেস করতে পারেন।

ড্রাইভ ফাইলগুলির জন্য, এটি ব্যবহারকারীকে দর্শকদের তালিকা থেকেও সরিয়ে দেয়৷

পরামিতি

নাম টাইপ বর্ণনা
user User সরানোর জন্য ব্যবহারকারীর একটি প্রতিনিধিত্ব.

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

requiresLogin()

ফর্মটির জন্য উত্তরদাতাদের প্রতিক্রিয়া দেওয়ার আগে একই ডোমেনে বা একটি সাবডোমেনে একটি অ্যাকাউন্টে লগ ইন করতে হবে কিনা তা নির্ধারণ করে৷

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Checks if the form requires respondents to log in to a Google Workspace account
// before responding and logs it to the console.
const login = form.requiresLogin();
console.log(login);

প্রত্যাবর্তন

Booleantrue যদি ফর্মটিতে ব্যবহারকারীদের লগ ইন করতে হয়; false যদি না হয়।


setAcceptingResponses(enabled)

ফর্মটি বর্তমানে প্রতিক্রিয়াগুলি গ্রহণ করছে কিনা তা সেট করে৷ নতুন ফর্মের জন্য ডিফল্ট true

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Sets the form to accept responses.
form.setAcceptingResponses(true);

// Checks whether the form is accepting responses or not and logs it to the console.
console.log(form.isAcceptingResponses());

পরামিতি

নাম টাইপ বর্ণনা
enabled Boolean true যদি ফর্ম প্রতিক্রিয়া গ্রহণ করা উচিত; false যদি এটা উচিত না.

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

setAllowResponseEdits(enabled)

ফর্মটি জমা দেওয়ার পরে একটি প্রতিক্রিয়া সম্পাদনা করার জন্য একটি লিঙ্ক প্রদর্শন করে কিনা তা সেট করে। নতুন ফর্মের জন্য ডিফল্ট false

এই সেটিং নির্বিশেষে, পদ্ধতি FormResponse.getEditResponseUrl() একজন স্ক্রিপ্ট লেখককে অনুমতি দেয় যার কাছে ফর্মটিতে সম্পাদনা করার অনুমতি রয়েছে এমন একটি URL তৈরি করতে যা একটি প্রতিক্রিয়া সম্পাদনা করতে ব্যবহার করা যেতে পারে৷

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Shows "Edit your response" link after someone submits the form.
form.setAllowResponseEdits(true);

// Checks whether the option to edit the form after a user submits it is set to true or not
// and logs it to the console.
console.log(form.canEditResponse());

পরামিতি

নাম টাইপ বর্ণনা
enabled Boolean true যদি ফর্মটি একটি "আপনার প্রতিক্রিয়া সম্পাদনা করুন" লিঙ্ক প্রদর্শন করে; false না হলে।

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

setCollectEmail(collect)

ফর্মটি উত্তরদাতাদের ইমেল ঠিকানা সংগ্রহ করে কিনা তা সেট করে। নতুন ফর্মের জন্য ডিফল্ট false

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Sets the form to collect respondents' email addresses.
form.setCollectEmail(true);

// Checks whether the value is set to true or false and logs it to the console.
const collect = form.collectsEmail();
console.log(collect);

পরামিতি

নাম টাইপ বর্ণনা
collect Boolean true যদি ফর্ম ইমেল ঠিকানা সংগ্রহ করা উচিত; false যদি না হয়।

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

setConfirmationMessage(message)

ফর্মের নিশ্চিতকরণ বার্তা সেট করে।

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Sets a custom confirmation message to display after someone submits the form.
form.setConfirmationMessage('Your form has been successfully submitted.');

// Gets the confirmation message set for the form and logs it to the console.
const message = form.getConfirmationMessage();
console.log(message);

পরামিতি

নাম টাইপ বর্ণনা
message String ফর্মের নতুন নিশ্চিতকরণ বার্তা।

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

setCustomClosedFormMessage(message)

ফর্মটি প্রতিক্রিয়া গ্রহণ না করলে প্রদর্শনের জন্য বার্তা সেট করে। যদি কোন বার্তা সেট করা না থাকে, ফর্মটি একটি ডিফল্ট বার্তা ব্যবহার করে।

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Sets the form to not accept responses.
form.setAcceptingResponses(false);

// Sets a custom closed form message to display to the user.
form.setCustomClosedFormMessage('The form is no longer accepting responses.');

// Gets the custom message set for the form and logs it to the console.
const message = form.getCustomClosedFormMessage();
console.log(message);

পরামিতি

নাম টাইপ বর্ণনা
message String ফর্মটি প্রতিক্রিয়া গ্রহণ না করলে প্রদর্শনের জন্য বার্তা৷

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

setDescription(description)

ফর্মের বিবরণ সেট করে।

পরামিতি

নাম টাইপ বর্ণনা
description String ফর্মের নতুন বিবরণ।

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

setDestination(type, id)

গন্তব্য সেট করে যেখানে ফর্ম প্রতিক্রিয়া সংরক্ষিত হয়। সমস্ত ফর্ম, যার মধ্যে স্পষ্টভাবে একটি গন্তব্য সেট নেই, ফর্মের প্রতিক্রিয়া স্টোরে প্রতিক্রিয়াগুলির একটি অনুলিপি সংরক্ষণ করুন

পরামিতি

নাম টাইপ বর্ণনা
type DestinationType ফর্মের প্রতিক্রিয়া গন্তব্যের ধরন৷
id String ফর্মের প্রতিক্রিয়া গন্তব্যের ID।

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

নিক্ষেপ করে

Error — যদি প্রদত্ত গন্তব্য আইডি অবৈধ হয়

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

setIsQuiz(enabled)

ফর্মটি একটি কুইজ কিনা তা সেট করে৷ নতুন ফর্মের জন্য ডিফল্ট false

গ্রেড করা প্রশ্নগুলি শুধুমাত্র কুইজে অনুমোদিত, তাই এটিকে false হিসাবে সেট করার ফলে সমস্ত প্রশ্ন থেকে সমস্ত গ্রেডিং বিকল্পগুলি সরানো হয়৷

কুইজ সেটিংস শুধুমাত্র নতুন ফর্ম UI এ উপলব্ধ; একটি ফর্ম তৈরি করে একটি কুইজ নতুন UI ব্যবহার করার জন্য ফর্মটিকে বেছে নেয়।

// Opens the Forms file by its URL. If you created your script from within a
// Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Makes the form a quiz.
form.setIsQuiz(true);

// Checks whether the form is a quiz or not and logs it to the console.
console.log(form.isQuiz());

পরামিতি

নাম টাইপ বর্ণনা
enabled Boolean true যদি ফর্মের জন্য কুইজের বৈশিষ্ট্যগুলি সক্রিয় করা উচিত; false না হলে।

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

setLimitOneResponsePerUser(enabled)

ফর্ম প্রতি উত্তরদাতা শুধুমাত্র একটি প্রতিক্রিয়া অনুমতি দেয় কিনা সেট করে। নতুন ফর্মের জন্য ডিফল্ট false । মানটি true হিসাবে সেট করা থাকলে, স্ক্রিপ্টটি মোটেও ফর্ম প্রতিক্রিয়া জমা দিতে পারে না।

পরামিতি

নাম টাইপ বর্ণনা
enabled Boolean true যদি ফর্মটি প্রতি উত্তরদাতা শুধুমাত্র একটি প্রতিক্রিয়ার অনুমতি দেয়; false না হলে।

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

setProgressBar(enabled)

ফর্মটিতে একটি অগ্রগতি বার আছে কিনা তা সেট করে। নতুন ফর্মের জন্য ডিফল্ট false

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Displays the progress bar on the form.
form.setProgressBar(true);

// Checks whether the form has a progress bar and logs it to the console.
console.log(form.hasProgressBar());

পরামিতি

নাম টাইপ বর্ণনা
enabled Boolean true যদি ফর্মটি একটি অগ্রগতি বার প্রদর্শন করে; false যদি না হয়।

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

setPublishingSummary(enabled)

উত্তরদাতা ফর্ম জমা দেওয়ার পরে ফর্মটি প্রতিক্রিয়াগুলির সারাংশ দেখার জন্য একটি লিঙ্ক প্রদর্শন করে কিনা তা সেট করে। নতুন ফর্মের জন্য ডিফল্ট false

পরামিতি

নাম টাইপ বর্ণনা
enabled Boolean true যদি ফর্মটি একটি "আগের প্রতিক্রিয়া দেখুন" লিঙ্ক প্রদর্শন করে; false না হলে।

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

setRequireLogin(requireLogin)

ফর্মটির জন্য উত্তরদাতাদের প্রতিক্রিয়া দেওয়ার আগে একই ডোমেনে বা একটি সাবডোমেনে একটি অ্যাকাউন্টে লগ ইন করতে হবে কিনা তা সেট করে৷ একটি ডোমেন প্রশাসক ডিফল্ট পরিবর্তন না করলে নতুন ফর্মের জন্য false

এই বৈশিষ্ট্যটি শুধুমাত্র Google Workspace ব্যবহারকারীদের তৈরি করা ফর্মের জন্য উপলব্ধ। অন্য ধরনের Google অ্যাকাউন্টের ব্যবহারকারীদের লগ ইন করার প্রয়োজন হতে পারে না।

// Opens the Forms file by its URL. If you created your script from within
// a Google Forms file, you can use FormApp.getActiveForm() instead.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Sets the form so that users must log in to their Google Workspace account.
form.setRequireLogin(true);

// Checks whether the form requires login or not and logs it to the console.
console.log(form.requiresLogin());

পরামিতি

নাম টাইপ বর্ণনা
requireLogin Boolean true যদি ফর্মটিতে ব্যবহারকারীদের লগ ইন করতে হয়; false যদি না হয়।

প্রত্যাবর্তন

Form - বর্তমান ফর্ম (চেইন করার জন্য)।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

setShowLinkToRespondAgain(enabled)

উত্তরদাতা ফর্মটি পূরণ করার পরে ফর্মটি অন্য প্রতিক্রিয়া জমা দেওয়ার জন্য একটি লিঙ্ক প্রদর্শন করে কিনা তা সেট করে। নতুন ফর্মের জন্য ডিফল্ট true

পরামিতি

নাম টাইপ বর্ণনা
enabled Boolean true যদি ফর্মটি একটি "অন্য প্রতিক্রিয়া জমা দিন" লিঙ্ক প্রদর্শন করে; false না হলে।

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

setShuffleQuestions(shuffle)

ফর্মের প্রতিটি পৃষ্ঠায় প্রশ্নের ক্রম এলোমেলো করা হয়েছে কিনা তা সেট করে।

পরামিতি

নাম টাইপ বর্ণনা
shuffle Boolean true যদি ফর্মের প্রতিটি পৃষ্ঠায় প্রশ্নের ক্রম এলোমেলো করা উচিত; false না হলে।

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

setTitle(title)

ফর্মের শিরোনাম সেট করে।

পরামিতি

নাম টাইপ বর্ণনা
title String ফর্মের নতুন শিরোনাম।

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

shortenFormUrl(url)

একটি ফর্মের জন্য একটি দীর্ঘ URL একটি ছোট URL এ রূপান্তর করে৷ যদি দীর্ঘ URLটি Google ফর্মের অন্তর্গত না হয় তবে একটি ব্যতিক্রম থ্রো করে৷

পরামিতি

নাম টাইপ বর্ণনা
url String সংক্ষিপ্ত করার জন্য URL.

প্রত্যাবর্তন

String — ফর্মের একটি URL http://goo.gl/forms/1234

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

submitGrades(responses)

প্রদত্ত ফর্ম প্রতিক্রিয়াগুলির জন্য গ্রেড জমা দেয়৷

যদি আপনার কোডে একটি onFormSubmit ট্রিগার থাকে, তাহলে submitGrades() কল করলে onFormSubmit শর্তটি ট্রিগার হয় এবং একটি অসীম লুপ সৃষ্টি করে। অসীম লুপ প্রতিরোধ করতে, submitGrades() কল করার আগে গ্রেডগুলি ইতিমধ্যেই বিদ্যমান কিনা তা পরীক্ষা করে এমন কোড যোগ করুন।

পরামিতি

নাম টাইপ বর্ণনা
responses FormResponse[] ফর্মের সমস্ত প্রতিক্রিয়াগুলির একটি অ্যারে৷

প্রত্যাবর্তন

Form - এই Form , চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms