একটি ফর্ম যাতে সামগ্রিক বৈশিষ্ট্য এবং আইটেম থাকে। বৈশিষ্ট্যগুলোর মধ্যে রয়েছে শিরোনাম, সেটিংস এবং উত্তরগুলো কোথায় সংরক্ষিত হবে। আইটেমগুলোর মধ্যে রয়েছে চেকবক্স বা রেডিও আইটেমের মতো প্রশ্নমূলক বিষয়, আর লেআউট আইটেম বলতে পৃষ্ঠা বিভাজনের মতো বিষয়গুলোকে বোঝায়। FormApp থেকে ফর্মগুলো অ্যাক্সেস বা তৈরি করা যায়।
// 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 | ফর্মের সম্পাদনা মোডে প্রবেশ করার জন্য ব্যবহারযোগ্য ইউআরএলটি পাওয়া যায়। |
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 | ফর্মের দীর্ঘ ইউআরএলকে সংক্ষিপ্ত ইউআরএলে রূপান্তর করে। |
submit Grades(responses) | Form | প্রদত্ত ফর্মরেসপন্সগুলোর জন্য গ্রেড জমা দেয়। |
supports Advanced Responder Permissions() | Boolean | ফর্মটি প্রকাশ সমর্থন করে কিনা তা নির্ধারণ করে। |
বিস্তারিত ডকুমেন্টেশন
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(); 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 সম্পাদকদের তালিকায় যুক্ত করে। যদি ব্যবহারকারী ইতিমধ্যেই দর্শক বা উত্তরদাতাদের তালিকায় থাকেন, তবে এই পদ্ধতিটি তাকে তালিকা থেকে সরিয়ে দেয়।
// 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
addEditor(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
addEditors(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
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
addPublishedReader(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
addPublishedReader(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
addPublishedReaders(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
addRatingItem()
একটি নতুন প্রশ্ন যুক্ত করা হয়েছে, যা উত্তরদাতাকে রেটিং দেওয়ার সুযোগ দেয়।
// 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();
ফেরত
RatingItem — নতুন তৈরি করা আইটেমটি।
অনুমোদন
যে স্ক্রিপ্টগুলো এই পদ্ধতি ব্যবহার করে, সেগুলোর জন্য নিম্নলিখিত এক বা একাধিক স্কোপের মাধ্যমে অনুমোদনের প্রয়োজন হয়:
-
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);
ফেরত
Boolean — ফর্মটিতে "আপনার উত্তর সম্পাদনা করুন" লিঙ্কটি প্রদর্শিত হলে true ; না হলে 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);
ফেরত
Boolean — ফর্মটি ইমেল ঠিকানা সংগ্রহ করলে true , না করলে 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)
ফর্মের রেসপন্স স্টোর থেকে একটিমাত্র রেসপন্স মুছে দেয়। এই মেথডটি কোনো বাহ্যিক রেসপন্স ডেস্টিনেশনে (যেমন স্প্রেডশিট) সংরক্ষিত রেসপন্সের কপিগুলো মুছে দেয় না, কিন্তু ফর্মের সামারি ভিউ থেকে রেসপন্সটি সরিয়ে দেয়। FormResponse.getId() ব্যবহার করে রেসপন্স আইডিটি পাওয়া যায়।
প্যারামিটার
| নাম | প্রকার | বর্ণনা |
|---|---|---|
response Id | 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()
ফর্মের সম্পাদনা মোডে প্রবেশ করার জন্য ব্যবহারযোগ্য ইউআরএলটি পাওয়া যায়।
// 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 — প্রদত্ত আইডিযুক্ত আইটেম, অথবা ফর্মে আইটেমটি না থাকলে 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);
প্যারামিটার
| নাম | প্রকার | বর্ণনা |
|---|---|---|
item Type | Item Type | যে ধরনের আইটেম পুনরুদ্ধার করতে হবে। |
ফেরত
Item[] — ঐ ধরণের সকল আইটেমের একটি অ্যারে।
অনুমোদন
যে স্ক্রিপ্টগুলো এই পদ্ধতি ব্যবহার করে, সেগুলোর জন্য নিম্নলিখিত এক বা একাধিক স্কোপের মাধ্যমে অনুমোদনের প্রয়োজন হয়:
-
https://www.googleapis.com/auth/forms.currentonly -
https://www.googleapis.com/auth/forms
getPublishedReaders()
এই 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
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() থেকে সংগ্রহ করা যায়।
প্যারামিটার
| নাম | প্রকার | বর্ণনা |
|---|---|---|
response Id | 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()
ফর্মের প্রতিটি পৃষ্ঠায় প্রশ্নগুলোর ক্রম এলোমেলো হবে কিনা তা নির্ধারণ করে।
ফেরত
Boolean — ফর্মের প্রতিটি পৃষ্ঠায় প্রশ্নগুলোর ক্রম এলোমেলো হলে true ; না হলে 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 — প্রতিক্রিয়াগুলির সারাংশ দেখার জন্য ইউআরএল।
অনুমোদন
যে স্ক্রিপ্টগুলো এই পদ্ধতি ব্যবহার করে, সেগুলোর জন্য নিম্নলিখিত এক বা একাধিক স্কোপের মাধ্যমে অনুমোদনের প্রয়োজন হয়:
-
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 হয়, তাহলে স্ক্রিপ্টটি ফর্মের কোনো উত্তরই জমা দিতে পারবে না।
ফেরত
Boolean — যদি ফর্মটিতে প্রতি উত্তরদাতার জন্য কেবল একটিই উত্তর দেওয়ার সুযোগ থাকে, তবে true ; অন্যথায় 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());
ফেরত
Boolean — ফর্মটিতে প্রোগ্রেস বার প্রদর্শিত হলে true ; না হলে false ।
অনুমোদন
যে স্ক্রিপ্টগুলো এই পদ্ধতি ব্যবহার করে, সেগুলোর জন্য নিম্নলিখিত এক বা একাধিক স্কোপের মাধ্যমে অনুমোদনের প্রয়োজন হয়:
-
https://www.googleapis.com/auth/forms.currentonly -
https://www.googleapis.com/auth/forms
hasRespondAgainLink()
উত্তরদাতা ফর্মটি পূরণ করার পর আরেকটি উত্তর জমা দেওয়ার জন্য কোনো লিঙ্ক প্রদর্শিত হবে কিনা, তা নির্ধারণ করে।
// 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 — ফর্মটিতে "Submit another response" লিঙ্কটি প্রদর্শিত হলে true ; না হলে 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);
ফেরত
Boolean — ফর্মটি প্রতিক্রিয়া গ্রহণ করলে ' true ; না করলে false '।
অনুমোদন
যে স্ক্রিপ্টগুলো এই পদ্ধতি ব্যবহার করে, সেগুলোর জন্য নিম্নলিখিত এক বা একাধিক স্কোপের মাধ্যমে অনুমোদনের প্রয়োজন হয়:
-
https://www.googleapis.com/auth/forms.currentonly -
https://www.googleapis.com/auth/forms
isPublished()
ফর্মটি প্রকাশিত হবে কিনা তা নির্ধারণ করে।
এই ফিচারটি শুধুমাত্র পাবলিশিং সমর্থন করে এমন ফর্মের জন্য উপলব্ধ। ফর্মটি পাবলিশিং সমর্থন করে কিনা তা পরীক্ষা করতে supportsAdvancedResponderPermissions() ব্যবহার করুন।
// 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
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);
ফেরত
Boolean — ফর্মটিতে "পূর্ববর্তী উত্তরগুলো দেখুন" লিঙ্কটি প্রদর্শিত হলে true ; না হলে 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());
ফেরত
Boolean — ফর্মটি প্রতিক্রিয়া গ্রহণ করলে ' true ; না করলে 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 | সরানোর জন্য জিনিসটি। |
to Index | 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 এমন কোনো শেয়ার্ড ড্রাইভে থাকে যেখানে ব্যবহারকারী প্রবেশ করতে পারেন।
ড্রাইভ ফাইলের ক্ষেত্রে, এটি ব্যবহারকারীকে দর্শক এবং উত্তরদাতাদের তালিকা থেকেও সরিয়ে দেয়।
// 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
removeEditor(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
removePublishedReader(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
removePublishedReader(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
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 , শৃঙ্খল তৈরির জন্য।
নিক্ষেপ
Error — যদি কোনো অপ্রকাশিত ফর্মে এটি সক্রিয় করা থাকে।
অনুমোদন
যে স্ক্রিপ্টগুলো এই পদ্ধতি ব্যবহার করে, সেগুলোর জন্য নিম্নলিখিত এক বা একাধিক স্কোপের মাধ্যমে অনুমোদনের প্রয়োজন হয়:
-
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 | Destination Type | ফর্মটির প্রতিক্রিয়া গন্তব্যের ধরণ। |
id | String | ফর্মটির প্রতিক্রিয়া গন্তব্যের আইডি। |
ফেরত
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
setPublished(enabled)
ফর্মটি প্রকাশিত হবে কিনা তা নির্ধারণ করে। নতুন ফর্মের জন্য ডিফল্ট মান হলো true ।
এই ফিচারটি শুধুমাত্র পাবলিশিং সমর্থন করে এমন ফর্মের জন্য উপলব্ধ। ফর্মটি পাবলিশিং সমর্থন করে কিনা তা পরীক্ষা করতে supportsAdvancedResponderPermissions() ব্যবহার করুন।
উত্তরদাতাদের কাছে ফর্মটি অ্যাক্সেসযোগ্য হওয়ার জন্য এটিকে প্রকাশ করতে হবে। এই পদ্ধতিটি setAcceptingResponses(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
setPublishingSummary(enabled)
কোনো উত্তরদাতা ফর্ম জমা দেওয়ার পর, ফর্মটি তার উত্তরগুলোর সারাংশ দেখার জন্য একটি লিঙ্ক প্রদর্শন করবে কিনা তা নির্ধারণ করে। নতুন ফর্মের জন্য ডিফল্ট মান হলো false ।
প্যারামিটার
| নাম | প্রকার | বর্ণনা |
|---|---|---|
enabled | Boolean | ফর্মটিতে "পূর্ববর্তী উত্তরগুলো দেখুন" লিঙ্কটি প্রদর্শন করতে হলে true ; না হলে false '। |
ফেরত
Form — এই Form , শৃঙ্খল তৈরির জন্য।
অনুমোদন
যে স্ক্রিপ্টগুলো এই পদ্ধতি ব্যবহার করে, সেগুলোর জন্য নিম্নলিখিত এক বা একাধিক স্কোপের মাধ্যমে অনুমোদনের প্রয়োজন হয়:
-
https://www.googleapis.com/auth/forms.currentonly -
https://www.googleapis.com/auth/forms
setShowLinkToRespondAgain(enabled)
কোনো উত্তরদাতা ফর্মটি পূরণ করার পর আরেকটি উত্তর জমা দেওয়ার জন্য কোনো লিঙ্ক প্রদর্শিত হবে কি না, তা নির্ধারণ করে। নতুন ফর্মের জন্য ডিফল্ট মান হলো true ।
প্যারামিটার
| নাম | প্রকার | বর্ণনা |
|---|---|---|
enabled | Boolean | ফর্মটিতে "Submit another response" লিঙ্কটি প্রদর্শন করতে হলে 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-টি গুগল ফর্মসের না হলে একটি ব্যতিক্রমী ত্রুটি (exception) দেখায়।
প্যারামিটার
| নাম | প্রকার | বর্ণনা |
|---|---|---|
url | String | যে URL-টি সংক্ষিপ্ত করতে হবে। |
ফেরত
String — http://goo.gl/forms/1234 এই ধরনের একটি URL।
অনুমোদন
যে স্ক্রিপ্টগুলো এই পদ্ধতি ব্যবহার করে, সেগুলোর জন্য নিম্নলিখিত এক বা একাধিক স্কোপের মাধ্যমে অনুমোদনের প্রয়োজন হয়:
-
https://www.googleapis.com/auth/forms.currentonly -
https://www.googleapis.com/auth/forms
submitGrades(responses)
প্রদত্ত ফর্মরেসপন্সগুলোর জন্য গ্রেড জমা দেয়।
আপনার কোডে যদি onFormSubmit ট্রিগার থাকে, তাহলে submitGrades() কল করলে onFormSubmit কন্ডিশনটি ট্রিগার হয় এবং একটি ইনফিনিট লুপ তৈরি হয়। এই ইনফিনিট লুপ প্রতিরোধ করতে, submitGrades() কল করার আগে গ্রেড আগে থেকে আছে কিনা তা যাচাই করার জন্য কোড যোগ করুন।
প্যারামিটার
| নাম | প্রকার | বর্ণনা |
|---|---|---|
responses | Form Response[] | ফর্মটির সমস্ত প্রতিক্রিয়াগুলির একটি অ্যারে। |
ফেরত
Form — এই Form , শৃঙ্খল তৈরির জন্য।
অনুমোদন
যে স্ক্রিপ্টগুলো এই পদ্ধতি ব্যবহার করে, সেগুলোর জন্য নিম্নলিখিত এক বা একাধিক স্কোপের মাধ্যমে অনুমোদনের প্রয়োজন হয়:
-
https://www.googleapis.com/auth/forms.currentonly -
https://www.googleapis.com/auth/forms
supportsAdvancedResponderPermissions()
ফর্মটি পাবলিশিং সমর্থন করে কিনা তা নির্ধারণ করে। setPublished(enabled) ও isPublished() মেথড এবং রেসপন্ডার পারমিশনগুলো উপলব্ধ আছে কিনা, তা নির্ধারণ করতে এই মেথডটি ব্যবহৃত হয়।
// 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