Class Form

ফর্ম

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

// Open a form by ID and create a new spreadsheet.
const form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
const 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());

পদ্ধতি

পদ্ধতি রিটার্ন টাইপ সংক্ষিপ্ত বিবরণ
add Checkbox Grid Item() Checkbox Grid Item কলাম এবং সারির একটি গ্রিড হিসেবে উপস্থাপিত একটি নতুন প্রশ্ন আইটেম যুক্ত করে, যা উত্তরদাতাকে চেকবক্সের ক্রম থেকে প্রতি সারিতে একাধিক পছন্দ নির্বাচন করতে দেয়।
add Checkbox Item() Checkbox Item একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে এক বা একাধিক চেকবক্স নির্বাচন করতে দেয়, সেইসাথে একটি ঐচ্ছিক "অন্যান্য" ক্ষেত্রও।
add Date Item() Date Item একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে একটি তারিখ নির্দেশ করতে দেয়।
add Date Time Item() Date Time Item একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে একটি তারিখ এবং সময় নির্দেশ করতে দেয়।
add Duration Item() Duration Item একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে সময়কাল নির্দেশ করতে দেয়।
add Editor(emailAddress) Form প্রদত্ত ব্যবহারকারীকে Form সম্পাদকদের তালিকায় যুক্ত করে।
add Editor(user) Form প্রদত্ত ব্যবহারকারীকে Form সম্পাদকদের তালিকায় যুক্ত করে।
add Editors(emailAddresses) Form Form সম্পাদকদের তালিকায় ব্যবহারকারীদের প্রদত্ত অ্যারে যোগ করে।
add Grid Item() Grid Item কলাম এবং সারির একটি গ্রিড হিসেবে উপস্থাপিত একটি নতুন প্রশ্ন আইটেম যুক্ত করে, যা উত্তরদাতাকে রেডিও বোতামের ক্রম থেকে প্রতি সারিতে একটি পছন্দ নির্বাচন করতে দেয়।
add Image Item() Image Item একটি নতুন লেআউট আইটেম যুক্ত করে যা একটি চিত্র প্রদর্শন করে।
add List Item() List Item একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে ড্রপডাউন তালিকা থেকে একটি পছন্দ নির্বাচন করতে দেয়।
add Multiple Choice Item() Multiple Choice Item একটি নতুন প্রশ্ন আইটেম যোগ করে যা উত্তরদাতাকে রেডিও বোতামের তালিকা অথবা একটি ঐচ্ছিক "অন্যান্য" ক্ষেত্র থেকে একটি পছন্দ নির্বাচন করতে দেয়।
add Page Break Item() Page Break Item একটি নতুন লেআউট আইটেম যোগ করে যা একটি পৃষ্ঠার শুরু চিহ্নিত করে।
add Paragraph Text Item() Paragraph Text Item একটি নতুন প্রশ্ন আইটেম যোগ করে যা উত্তরদাতাকে টেক্সটের একটি ব্লক প্রবেশ করতে দেয়।
add Published Reader(emailAddress) Form প্রদত্ত ব্যবহারকারীকে Form জন্য উত্তরদাতাদের তালিকায় যুক্ত করে।
add Published Reader(user) Form প্রদত্ত ব্যবহারকারীকে Form জন্য উত্তরদাতাদের তালিকায় যুক্ত করে।
add Published Readers(emailAddresses) Form Form জন্য উত্তরদাতাদের তালিকায় ব্যবহারকারীদের প্রদত্ত অ্যারে যোগ করে।
add Rating Item() Rating Item একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে একটি রেটিং দেওয়ার অনুমতি দেয়।
add Scale Item() Scale Item একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে রেডিও বোতামের সংখ্যাযুক্ত ক্রম থেকে একটি বিকল্প বেছে নিতে দেয়।
add Section Header Item() Section Header Item একটি নতুন লেআউট আইটেম যুক্ত করে যা দৃশ্যত একটি বিভাগের শুরু নির্দেশ করে।
add Text Item() Text Item একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে এক লাইনের লেখা লিখতে দেয়।
add Time Item() Time Item একটি নতুন প্রশ্ন আইটেম যুক্ত করে যা উত্তরদাতাকে দিনের একটি সময় নির্দেশ করতে দেয়।
add Video Item() Video Item একটি নতুন লেআউট আইটেম যুক্ত করে যা একটি ভিডিও প্রদর্শন করে।
can Edit Response() Boolean ফর্মটি জমা দেওয়ার পরে কোনও প্রতিক্রিয়া সম্পাদনা করার জন্য কোনও লিঙ্ক প্রদর্শন করে কিনা তা নির্ধারণ করে।
collects Email() Boolean ফর্মটি উত্তরদাতাদের ইমেল ঠিকানা সংগ্রহ করে কিনা তা নির্ধারণ করে।
create Response() Form Response ফর্মটিতে একটি নতুন প্রতিক্রিয়া তৈরি করে।
delete All Responses() Form ফর্মের প্রতিক্রিয়া স্টোর থেকে জমা দেওয়া সমস্ত প্রতিক্রিয়া মুছে ফেলে।
delete Item(index) void ফর্মের সমস্ত আইটেমের মধ্যে একটি নির্দিষ্ট সূচীতে আইটেমটি মুছে ফেলে।
delete Item(item) void প্রদত্ত আইটেমটি মুছে ফেলে।
delete Response(responseId) Form ফর্মের প্রতিক্রিয়া স্টোর থেকে একটি একক প্রতিক্রিয়া মুছে ফেলে।
get Confirmation Message() String ফর্মের নিশ্চিতকরণ বার্তা পায়।
get Custom Closed Form Message() String ফর্মটি প্রতিক্রিয়া গ্রহণ না করলে প্রদর্শিত কাস্টম বার্তাটি পায়, অথবা যদি কোনও কাস্টম বার্তা সেট না করা থাকে তবে একটি খালি স্ট্রিং পায়।
get Description() String ফর্মের বিবরণ পায়।
get Destination Id() String ফর্মের প্রতিক্রিয়া গন্তব্যের আইডি পায়।
get Destination Type() Destination Type ফর্মের প্রতিক্রিয়া গন্তব্যের ধরণটি পায়।
get Edit Url() String ফর্মের সম্পাদনা মোড অ্যাক্সেস করতে ব্যবহার করা যেতে পারে এমন URL পায়।
get Editors() User[] এই Form সম্পাদকদের তালিকা পায়।
get Id() String ফর্মের আইডি পায়।
get Item By Id(id) Item |null একটি নির্দিষ্ট আইডি সহ আইটেমটি পায়।
get Items() Item[] ফর্মের সকল আইটেমের একটি অ্যারে পায়।
get Items(itemType) Item[] একটি প্রদত্ত ধরণের সমস্ত আইটেমের একটি অ্যারে পায়।
get Published Readers() User[] এই Form জন্য উত্তরদাতাদের তালিকা পায়।
get Published Url() String ফর্মের উত্তর দেওয়ার জন্য ব্যবহার করা যেতে পারে এমন URL পায়।
get Response(responseId) Form Response এর প্রতিক্রিয়া আইডির উপর ভিত্তি করে একটি একক ফর্ম প্রতিক্রিয়া পায়।
get Responses() Form Response[] ফর্মের সমস্ত প্রতিক্রিয়ার একটি অ্যারে পায়।
get Responses(timestamp) Form Response[] একটি নির্দিষ্ট তারিখ এবং সময়ের পরে ফর্মের সমস্ত প্রতিক্রিয়ার একটি অ্যারে পায়।
get Shuffle Questions() Boolean ফর্মের প্রতিটি পৃষ্ঠায় প্রশ্নের ক্রম এলোমেলো কিনা তা নির্ধারণ করে।
get Summary Url() String ফর্মের প্রতিক্রিয়াগুলির সারাংশ দেখতে ব্যবহার করা যেতে পারে এমন URL পায়।
get Title() String ফর্মের শিরোনাম পায়।
has Limit One Response Per User() Boolean ফর্মটি প্রতি উত্তরদাতার জন্য শুধুমাত্র একটি উত্তরের অনুমতি দেয় কিনা তা নির্ধারণ করে।
has Progress Bar() Boolean ফর্মটি একটি অগ্রগতি বার প্রদর্শন করে কিনা তা নির্ধারণ করে।
has Respond Again Link() Boolean একজন উত্তরদাতা ফর্মটি পূরণ করার পরে অন্য একটি প্রতিক্রিয়া জমা দেওয়ার জন্য ফর্মটি কোনও লিঙ্ক প্রদর্শন করে কিনা তা নির্ধারণ করে।
is Accepting Responses() Boolean ফর্মটি বর্তমানে প্রতিক্রিয়া গ্রহণ করছে কিনা তা নির্ধারণ করে।
is Published() Boolean ফর্মটি প্রকাশিত হয়েছে কিনা তা নির্ধারণ করে।
is Publishing Summary() Boolean একজন উত্তরদাতা ফর্মটি পূরণ করার পরে প্রতিক্রিয়াগুলির সারাংশ দেখার জন্য ফর্মটি কোনও লিঙ্ক প্রদর্শন করে কিনা তা নির্ধারণ করে।
is Quiz() Boolean ফর্মটি একটি কুইজ কিনা তা নির্ধারণ করে।
move Item(from, to) Item ফর্মের সমস্ত আইটেমের মধ্যে একটি প্রদত্ত সূচকে একটি আইটেমকে অন্য একটি প্রদত্ত সূচকে স্থানান্তর করে।
move Item(item, toIndex) Item ফর্মের সমস্ত আইটেমের মধ্যে একটি প্রদত্ত আইটেমকে একটি প্রদত্ত সূচীতে স্থানান্তর করে।
remove Destination() Form ফর্মটিকে তার বর্তমান প্রতিক্রিয়া গন্তব্য থেকে লিঙ্কমুক্ত করে।
remove Editor(emailAddress) Form Form সম্পাদকদের তালিকা থেকে প্রদত্ত ব্যবহারকারীকে সরিয়ে দেয়।
remove Editor(user) Form Form সম্পাদকদের তালিকা থেকে প্রদত্ত ব্যবহারকারীকে সরিয়ে দেয়।
remove Published Reader(emailAddress) Form Form জন্য উত্তরদাতাদের তালিকা থেকে প্রদত্ত ব্যবহারকারীকে সরিয়ে দেয়।
remove Published Reader(user) Form Form জন্য উত্তরদাতাদের তালিকা থেকে প্রদত্ত ব্যবহারকারীকে সরিয়ে দেয়।
set Accepting Responses(enabled) Form ফর্মটি বর্তমানে প্রতিক্রিয়া গ্রহণ করছে কিনা তা সেট করে।
set Allow Response Edits(enabled) Form ফর্মটি জমা দেওয়ার পরে কোনও প্রতিক্রিয়া সম্পাদনা করার জন্য কোনও লিঙ্ক প্রদর্শন করবে কিনা তা সেট করে।
set Collect Email(collect) Form ফর্মটি উত্তরদাতাদের ইমেল ঠিকানা সংগ্রহ করে কিনা তা সেট করে।
set Confirmation Message(message) Form ফর্মের নিশ্চিতকরণ বার্তা সেট করে।
set Custom Closed Form Message(message) Form ফর্মটি প্রতিক্রিয়া গ্রহণ না করলে বার্তাটি প্রদর্শিত হবে কিনা তা সেট করে।
set Description(description) Form ফর্মের বর্ণনা সেট করে।
set Destination(type, id) Form ফর্ম প্রতিক্রিয়াগুলি যেখানে সংরক্ষণ করা হয় সেই গন্তব্যস্থল নির্ধারণ করে।
set Is Quiz(enabled) Form ফর্মটি একটি কুইজ কিনা তা সেট করে।
set Limit One Response Per User(enabled) Form ফর্মটি প্রতি উত্তরদাতার জন্য শুধুমাত্র একটি প্রতিক্রিয়া অনুমোদন করে কিনা তা সেট করে।
set Progress Bar(enabled) Form ফর্মটির একটি অগ্রগতি বার আছে কিনা তা সেট করে।
set Published(enabled) Form ফর্মটি প্রকাশিত হয়েছে কিনা তা নির্ধারণ করে।
set Publishing Summary(enabled) Form একজন উত্তরদাতা ফর্ম জমা দেওয়ার পরে প্রতিক্রিয়াগুলির সারাংশ দেখার জন্য ফর্মটি একটি লিঙ্ক প্রদর্শন করবে কিনা তা সেট করে।
set Show Link To Respond Again(enabled) Form একজন উত্তরদাতা ফর্মটি পূরণ করার পরে অন্য একটি প্রতিক্রিয়া জমা দেওয়ার জন্য ফর্মটি একটি লিঙ্ক প্রদর্শন করবে কিনা তা সেট করে।
set Shuffle Questions(shuffle) Form ফর্মের প্রতিটি পৃষ্ঠায় প্রশ্নের ক্রম এলোমেলো কিনা তা সেট করে।
set Title(title) Form ফর্মের শিরোনাম সেট করে।
shorten Form Url(url) String একটি ফর্মের জন্য একটি দীর্ঘ URL কে একটি ছোট URL এ রূপান্তর করে।
submit Grades(responses) Form প্রদত্ত ফর্ম রেসপন্সের জন্য গ্রেড জমা দেয়।
supports Advanced Responder Permissions() Boolean ফর্মটি প্রকাশনা সমর্থন করে কিনা তা নির্ধারণ করে।

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

add Checkbox Grid 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',
);

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

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'
]);

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

Checkbox Grid Item — নতুন তৈরি আইটেম।

অনুমোদন

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

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

add Checkbox 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',
);

// 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']);

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

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

অনুমোদন

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

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

add Date 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',
);

// 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.');

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

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

অনুমোদন

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

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

add Date Time 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',
);

// 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);

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

Date Time Item — নতুন তৈরি আইটেম।

অনুমোদন

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

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

add Duration 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',
);

// 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);

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

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

অনুমোদন

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

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

add Editor(emailAddress)

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

// 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 editor to the form.
// TODO(developer): replace the emailAddress.
form.addEditor('editor@uni.edu');

পরামিতি

নাম আদর্শ বিবরণ
email Address String যোগ করার জন্য ব্যবহারকারীর ইমেল ঠিকানা।

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

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

অনুমোদন

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

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

add Editor(user)

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

// Opens the Forms file by its URL.
// TODO(developer): Replace the URL with your own.
const oldForm = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Gets the editors from the old form.
const users = oldForm.getEditors();

// Creates a new form.
const newForm = FormApp.create('New form');

// Adds the editors to a new form.
users.forEach(user => newForm.addEditor(user));

পরামিতি

নাম আদর্শ বিবরণ
user User যোগ করার জন্য ব্যবহারকারীর একটি প্রতিনিধিত্ব।

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

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

অনুমোদন

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

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

add Editors(emailAddresses)

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

// 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 editors to the form.
// TODO(developer): replace the emailAddress.
form.addPublishedReaders(['editor1@uni.edu', 'editor2@uni.edu']);

পরামিতি

নাম আদর্শ বিবরণ
email Addresses String[] ব্যবহারকারীদের ইমেল ঠিকানার একটি অ্যারে যোগ করতে হবে।

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

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

অনুমোদন

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

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

add Grid 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',
);

// 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'
]);

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

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

অনুমোদন

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

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

add Image 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',
);

// 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);

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

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

অনুমোদন

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

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

add List 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',
);

// 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')]);

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

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

অনুমোদন

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

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

add Multiple Choice 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',
);

// 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]);

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

Multiple Choice Item — নতুন তৈরি আইটেম।

অনুমোদন

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

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

add Page Break 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',
);

// 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);

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

Page Break Item — নতুন তৈরি আইটেম।

অনুমোদন

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

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

add Paragraph Text Item()

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

// 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?');

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

Paragraph Text Item — নতুন তৈরি আইটেম।

অনুমোদন

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

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

add Published Reader(emailAddress)

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

// 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 responder to the form.
// TODO(developer): replace the emailAddress.
form.addPublishedReader('responder@uni.edu');

পরামিতি

নাম আদর্শ বিবরণ
email Address String যোগ করার জন্য ব্যবহারকারীর ইমেল ঠিকানা।

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

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

অনুমোদন

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

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

add Published Reader(user)

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

// Opens the Forms file by its URL.
// TODO(developer): Replace the URL with your own.
const oldForm = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Gets the responders from the old form.
const users = oldForm.getPublishedReaders();

// Creates a new form.
const newForm = FormApp.create('New form');

// Adds the responders to a new form.
users.forEach(user => newForm.addPublishedReader(user));

পরামিতি

নাম আদর্শ বিবরণ
user User যোগ করার জন্য ব্যবহারকারীর একটি প্রতিনিধিত্ব।

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

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

অনুমোদন

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

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

add Published Readers(emailAddresses)

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

// 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 responders to the form.
// TODO(developer): replace the emailAddress.
form.addPublishedReaders(['responder1@uni.edu', 'responder2@uni.edu']);

পরামিতি

নাম আদর্শ বিবরণ
email Addresses String[] ব্যবহারকারীদের ইমেল ঠিকানার একটি অ্যারে যোগ করতে হবে।

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

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

অনুমোদন

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

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

add Rating 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',
);

// Adds the rating item.
const item = form.addRatingItem();

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

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

অনুমোদন

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

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

add Scale 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',
);

// 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');

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

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

অনুমোদন

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

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

add Section Header 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',
);

// 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');

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

Section Header Item — নতুন তৈরি আইটেম।

অনুমোদন

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

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

add Text 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',
);

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

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

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

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

অনুমোদন

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

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

add Time 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',
);

// 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?');

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

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

অনুমোদন

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

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

add Video 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',
);

// 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);

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

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

অনুমোদন

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

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

can Edit Response()

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

এই সেটিং যাই হোক না কেন, Form Response.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);

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

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

অনুমোদন

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

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

collects Email()

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

// 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);

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

Boolean — যদি ফর্মটি ইমেল ঠিকানা সংগ্রহ করে তবে true ; যদি না করে তবে false

অনুমোদন

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

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

create Response()

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

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

Form Response — নতুন তৈরি ফর্ম রেসপন্স।

অনুমোদন

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

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

delete All Responses()

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

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

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

অনুমোদন

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

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

delete Item(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

delete Item(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

delete Response(responseId)

ফর্মের রেসপন্স স্টোর থেকে একটি একক রেসপন্স মুছে ফেলে। এই পদ্ধতিটি কোনও বহিরাগত রেসপন্স ডেস্টিনেশনে (যেমন স্প্রেডশিটে) সংরক্ষিত রেসপন্সের কপি মুছে দেয় না, তবে ফর্মের সারাংশ ভিউ থেকে রেসপন্সটি সরিয়ে দেয়। রেসপন্স আইডিটি Form Response.getId() দিয়ে পুনরুদ্ধার করা যেতে পারে।

পরামিতি

নাম আদর্শ বিবরণ
response Id String মুছে ফেলার জন্য ফর্ম প্রতিক্রিয়ার আইডি।

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

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

অনুমোদন

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

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

get Confirmation 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 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

get Custom Closed Form 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 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

get Description()

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

// 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

get Destination Id()

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

// 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

get Destination Type()

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

// 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);

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

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

অনুমোদন

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

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

get Edit Url()

ফর্মের সম্পাদনা মোড অ্যাক্সেস করতে ব্যবহার করা যেতে পারে এমন 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

get Editors()

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

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

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

অনুমোদন

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

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

get Id()

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

// 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

get Item By Id(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 — প্রদত্ত আইডি সহ আইটেম, অথবা যদি আইটেমটি ফর্মে বিদ্যমান না থাকে তবে null

অনুমোদন

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

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

get Items()

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

// 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

get Items(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);

পরামিতি

নাম আদর্শ বিবরণ
item Type Item Type যে ধরণের জিনিসপত্র উদ্ধার করতে হবে।

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

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

অনুমোদন

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

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

get Published Readers()

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

// 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 responders for the form.
const users = form.getPublishedReaders();
users.forEach(user => console.log(user.getEmail()));

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

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

অনুমোদন

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

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

get Published Url()

ফর্মের উত্তর দেওয়ার জন্য ব্যবহার করা যেতে পারে এমন 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

get Response(responseId)

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

পরামিতি

নাম আদর্শ বিবরণ
response Id String ফর্মের প্রতিক্রিয়ার আইডি।

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

Form Response — ফর্ম রেসপন্স।

থ্রো

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

অনুমোদন

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

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

get Responses()

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

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

Form Response[] — ফর্মের সকল রেসপন্সের একটি অ্যারে।

অনুমোদন

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

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

get Responses(timestamp)

একটি নির্দিষ্ট তারিখ এবং সময়ের পরে ফর্মের সমস্ত প্রতিক্রিয়ার একটি অ্যারে পায়।

পরামিতি

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

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

Form Response[] — ফর্ম রেসপন্সের তালিকা।

অনুমোদন

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

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

get Shuffle Questions()

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

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

Boolean — ফর্মের প্রতিটি পৃষ্ঠার প্রশ্নের ক্রম এলোমেলোভাবে হলে true ; না হলে false

অনুমোদন

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

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

get Summary Url()

ফর্মের প্রতিক্রিয়াগুলির সারাংশ দেখার জন্য ব্যবহার করা যেতে পারে এমন URL পায়। set Publishing Summary(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

get Title()

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

// 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

has Limit One Response Per User()

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

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

Boolean — যদি ফর্মটি প্রতি উত্তরদাতার জন্য শুধুমাত্র একটি উত্তরের অনুমতি দেয় তবে true ; যদি না হয় তবে false

অনুমোদন

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

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

has Progress Bar()

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

// 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());

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

Boolean — যদি ফর্মটি একটি অগ্রগতি বার প্রদর্শন করে তবে true ; যদি না দেখায় তবে 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());

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

Boolean — যদি ফর্মটিতে "অন্য প্রতিক্রিয়া জমা দিন" লিঙ্কটি প্রদর্শিত হয় তবে true ; যদি না থাকে তবে false

অনুমোদন

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

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

is Accepting Responses()

ফর্মটি বর্তমানে প্রতিক্রিয়া গ্রহণ করছে কিনা তা নির্ধারণ করে। ফর্মের প্রকাশনার অবস্থা পরিবর্তন করা হলে এটি ওভাররাইট করা হয়।

// 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);

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

Boolean — যদি ফর্মটি প্রতিক্রিয়া গ্রহণ করে তবে true ; যদি না হয় তবে false

অনুমোদন

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

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

is Published()

ফর্মটি প্রকাশিত হয়েছে কিনা তা নির্ধারণ করে।

এই বৈশিষ্ট্যটি শুধুমাত্র প্রকাশনা সমর্থন করে এমন ফর্মগুলির জন্য উপলব্ধ। ফর্মটি প্রকাশনা সমর্থন করে কিনা তা পরীক্ষা করতে supports Advanced Responder Permissions() ব্যবহার করুন।

// 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 whether the form is published or not and logs it to the console.
console.log(form.isPublished());

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

Boolean — ফর্মটি প্রকাশিত হলে true ; না হলে false

থ্রো

Error — যদি অসমর্থিত ফর্মগুলিতে কল করা হয়।

অনুমোদন

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

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

is Publishing Summary()

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

// 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);

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

Boolean — যদি ফর্মটিতে "পূর্ববর্তী প্রতিক্রিয়াগুলি দেখুন" লিঙ্কটি প্রদর্শিত হয় তবে true ; যদি না থাকে তবে false

অনুমোদন

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

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

is Quiz()

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

// 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());

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

Boolean — যদি ফর্মটি প্রতিক্রিয়া গ্রহণ করে তবে true ; যদি না হয় তবে false

অনুমোদন

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

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

move Item(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

move Item(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 সরানোর জন্য জিনিসপত্র।
to Index Integer ফর্মের সমস্ত আইটেমের মধ্যে আইটেমটির জন্য নতুন সূচক।

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

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

থ্রো

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

অনুমোদন

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

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

remove Destination()

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

// 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

remove Editor(emailAddress)

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

ড্রাইভ ফাইলের ক্ষেত্রে, এটি ব্যবহারকারীকে দর্শক এবং প্রতিক্রিয়াকারীদের তালিকা থেকেও সরিয়ে দেয়।

// Opens the Forms file by its URL.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Removes the editor from the form.
// TODO(developer): replace the emailAddress.
form.removeEditor('editor@uni.edu');

পরামিতি

নাম আদর্শ বিবরণ
email Address String ব্যবহারকারীর ইমেল ঠিকানা যা সরাতে হবে।

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

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

অনুমোদন

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

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

remove Editor(user)

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

ড্রাইভ ফাইলের ক্ষেত্রে, এটি ব্যবহারকারীকে দর্শকদের তালিকা থেকেও সরিয়ে দেয়।

// Opens the Forms file by its URL.
// TODO(developer): Replace the URL with your own.
const form1 = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Gets the editors from the form.
const users = form1.getEditors();

// Opens another form.
// TODO(developer): Replace the URL with your own.
const form2 = FormApp.openByUrl('https://docs.google.com/forms/d/efg123456/edit');

// Removes editors from the form.
users.forEach(user => form2.removeEditor(user));

পরামিতি

নাম আদর্শ বিবরণ
user User ব্যবহারকারীর একটি প্রতিনিধিত্ব যা অপসারণ করতে হবে।

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

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

অনুমোদন

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

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

remove Published Reader(emailAddress)

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

ড্রাইভ ফাইলের ক্ষেত্রে, এটি ব্যবহারকারীকে দর্শক এবং সম্পাদকদের তালিকা থেকেও সরিয়ে দেয়।

// Opens the Forms file by its URL.
// TODO(developer): Replace the URL with your own.
const form = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Removes the responders from the form.
// TODO(developer): replace the emailAddress.
form.removePublishedReader('responder1@uni.edu');

পরামিতি

নাম আদর্শ বিবরণ
email Address String ব্যবহারকারীর ইমেল ঠিকানা যা সরাতে হবে।

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

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

অনুমোদন

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

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

remove Published Reader(user)

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

ড্রাইভ ফাইলের ক্ষেত্রে, এটি ব্যবহারকারীকে দর্শক এবং সম্পাদকদের তালিকা থেকেও সরিয়ে দেয়।

// Opens the Forms file by its URL.
// TODO(developer): Replace the URL with your own.
const form1 = FormApp.openByUrl('https://docs.google.com/forms/d/abc123456/edit');

// Gets the responders from the form.
const users = form1.getPublishedReaders();

// Opens another form.
// TODO(developer): Replace the URL with your own.
const form2 = FormApp.openByUrl('https://docs.google.com/forms/d/efg123456/edit');

// Removes responders from the form.
users.forEach(user => form2.removePublishedReader(user));

পরামিতি

নাম আদর্শ বিবরণ
user User ব্যবহারকারীর একটি প্রতিনিধিত্ব যা অপসারণ করতে হবে।

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

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

অনুমোদন

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

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

set Accepting Responses(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 , চেইনিং এর জন্য।

থ্রো

Error — যদি অপ্রকাশিত ফর্মে সক্ষম করা থাকে।

অনুমোদন

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

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

set Allow Response Edits(enabled)

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

এই সেটিং যাই হোক না কেন, Form Response.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

set Collect Email(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

set Confirmation Message(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

set Custom Closed Form Message(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

set Description(description)

ফর্মের বর্ণনা সেট করে।

পরামিতি

নাম আদর্শ বিবরণ
description String ফর্মের নতুন বর্ণনা।

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

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

অনুমোদন

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

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

set Destination(type, id)

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

পরামিতি

নাম আদর্শ বিবরণ
type Destination Type ফর্মের প্রতিক্রিয়া গন্তব্যের ধরণ।
id String ফর্মের প্রতিক্রিয়া গন্তব্যের আইডি।

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

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

থ্রো

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

অনুমোদন

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

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

set Is Quiz(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

set Limit One Response Per User(enabled)

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

পরামিতি

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

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

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

অনুমোদন

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

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

set Progress Bar(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

set Published(enabled)

ফর্মটি প্রকাশিত হয়েছে কিনা তা নির্ধারণ করে। নতুন ফর্মের জন্য ডিফল্ট হল true

এই বৈশিষ্ট্যটি শুধুমাত্র প্রকাশনা সমর্থন করে এমন ফর্মগুলির জন্য উপলব্ধ। ফর্মটি প্রকাশনা সমর্থন করে কিনা তা পরীক্ষা করতে supports Advanced Responder Permissions() ব্যবহার করুন।

উত্তরদাতাদের কাছে অ্যাক্সেসযোগ্য করার জন্য একটি ফর্ম প্রকাশ করতে হবে। এই পদ্ধতিটি কলগুলিকে set Accepting Responses(enabled) স্থানান্তর করে।

// 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',
);

// Publishes the form before sharing it.
form.setPublished(true);

// Checks whether the form is published or not and logs it to the console.
console.log(form.isPublished());

পরামিতি

নাম আদর্শ বিবরণ
enabled Boolean ফর্মটি প্রকাশ করা উচিত হলে true , না হলে false

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

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

থ্রো

Error — যদি অসমর্থিত ফর্মগুলিতে কল করা হয়।

অনুমোদন

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

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

set Publishing Summary(enabled)

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

পরামিতি

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

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

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

অনুমোদন

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

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

set Show Link To Respond Again(enabled)

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

পরামিতি

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

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

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

অনুমোদন

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

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

set Shuffle Questions(shuffle)

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

পরামিতি

নাম আদর্শ বিবরণ
shuffle Boolean ফর্মের প্রতিটি পৃষ্ঠার প্রশ্নের ক্রম এলোমেলোভাবে নির্ধারণ করা হলে true ; না হলে false

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

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

অনুমোদন

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

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

set Title(title)

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

পরামিতি

নাম আদর্শ বিবরণ
title String ফর্মটির নতুন শিরোনাম।

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

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

অনুমোদন

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

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

shorten Form Url(url)

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

পরামিতি

নাম আদর্শ বিবরণ
url String ছোট করার জন্য URL।

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

Stringhttp://goo.gl/forms/1234 আকারে একটি URL।

অনুমোদন

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

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

submit Grades(responses)

প্রদত্ত ফর্ম রেসপন্সের জন্য গ্রেড জমা দেয়।

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

পরামিতি

নাম আদর্শ বিবরণ
responses Form Response[] ফর্মের সমস্ত প্রতিক্রিয়ার একটি অ্যারে।

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

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

অনুমোদন

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

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

supports Advanced Responder Permissions()

ফর্মটি প্রকাশনা সমর্থন করে কিনা তা নির্ধারণ করে। এই পদ্ধতিটি set Published(enabled) এবং is Published() পদ্ধতি এবং প্রতিক্রিয়াকারী অনুমতিগুলি উপলব্ধ কিনা তা নির্ধারণ করতে ব্যবহৃত হয়।

// 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 whether the form supports publishing or not and logs it to the
// console.
console.log(form.supportsAdvancedResponderPermissions());

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

Boolean — যদি ফর্মটি প্রকাশনা সমর্থন করে তবে true ; যদি না করে তবে false

অনুমোদন

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

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

অবচিত পদ্ধতি