This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var SHEET_NAME = "xxx";//ชื่อชีต | |
| var SpreadsheetID = 'xxx' | |
| var SCRIPT_PROP = PropertiesService.getScriptProperties(); | |
| function doGet(e) { | |
| var template = HtmlService.createTemplateFromFile('forms') | |
| return template.evaluate().setSandboxMode(HtmlService.SandboxMode.IFRAME) | |
| .addMetaTag('viewport', 'width=device-width , initial-scale=1') | |
| } | |
| function setup() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function doGet() { | |
| var html = HtmlService.createTemplateFromFile('form-regist') | |
| return html.evaluate() | |
| } | |
| function recordData(data){ | |
| var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('แผ่น1') | |
| ss.appendRow([new Date() ,data.name , "'"+data.phone , data.level ,data.sex,data.birthday,data.cid,data.vacdate,data.timefix]) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function doGet(e) { | |
| var template = HtmlService.createTemplateFromFile('index') | |
| return template.evaluate().setSandboxMode(HtmlService.SandboxMode.IFRAME) | |
| .addMetaTag('viewport', 'width=device-width , initial-scale=1') | |
| } | |
| function setPlainText() { | |
| var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
| var sheets = ss.getSheets(); | |
| for(var i = 0; i < sheets.length; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function doGet(e) { | |
| return HtmlService.createHtmlOutputFromFile('xxx'); | |
| } | |
| function uploadFiles(form) { | |
| try { | |
| var dropbox = "HomeWork"; | |
| var folder, folders = DriveApp.getFoldersByName(dropbox); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //พัฒนาโดยครูอภิวัฒน์ วงศ์กัณหา ช่องยูทูป "ครูอภิวัฒ์ สอนสร้างสื่อ" | |
| var Tempfolder ; | |
| var fileSlide ; | |
| var copyFile; | |
| function myFunction() { | |
| var form = FormApp.openById('aaa'); // ***ใส่ form id*** | |
| var fRes = form.getResponses(); | |
| var fRes = fRes[fRes.length - 1]; | |
| var item = fRes.getItemResponses(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function doGet(e) { | |
| return HtmlService.createTemplateFromFile("index").evaluate() | |
| .setTitle("ระบบค้นหาข้อมูล") | |
| .addMetaTag('viewport', 'width=device-width, initial-scale=1') | |
| .setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL); | |
| } | |
| function processForm(formObject){ | |
| var concat = formObject.searchtext+formObject.searchtext2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** โค้ด.gs | |
| * ระบบรับสมัครนักเรียน พัฒนาโดย นายจิรศักดิ์ จิรสาโรช E-mail: niddeaw.n@gmail.com Tel : 0806393969 | |
| * เครดิตและอ่านรายละเอียด : https://github.com/jamiewilson/form-to-google-sheets | |
| * เครดิตต้นฉบับ: http://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/ | |
| * อัพเดทโค้ด 30 เมษายน 2564 เพิ่มระบบสร้างไฟล์ PDF ใบสมัคร , ส่ง อีเมล , แจ้งเตือนทางไลน์กลุ่ม , อัพโหลดรูปภาพ เครดิต ครูเก๋ | |
| * ตัวอย่างทำสำเนา | |
| * Google Sheet : https://docs.google.com/spreadsheets/d/1Hex42FmIAU3zle9lTGJjcOtfpwgQ0uP_owVySVyUWlc/copy | |
| * Google Slide : https://docs.google.com/presentation/d/1Cxu1u0OxgqhDEbJcIUJovP0UE8OQ2VJC6Wul7UjaM8Y/copy | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const URL_ID="id url";//ใส่ id url | |
| const DOC_FILE_ID = "id gg doc"; //ใส่ id gg doc | |
| const TEMP_FOLDER_ID = "id temp folder"; // | |
| const PDF_FOLDER_ID = "id pdf folder"; // | |
| const IMG_FOLDER_ID = "if image folder ; // | |
| const LINE_TOKEN = [""]; | |
| const SHEET_NAME = "แผ่น1";// | |
| const EMAIL_AD = "";// | |
| const IMG_COUNT ="2"; //จำนวนรูปที่บันทึก | |
| var patternData=["{วันที่สมัคร}","{ชื่อ สกุล}","{ชื่อเล่น}","{อีเมล}","{เบอร์โทรศัพท์}","{เพศ}","{อายุ}","{กรุ๊ปเลือด}","{รูปภาพ}","{idรูปภาพ}"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const URL_ID="1bGrXZQIun1dlP4huFm6qAQY0sn1jKTsRw975XT7kJUs";//ใส่ id url | |
| const DOC_FILE_ID = "1jQFMwubaPtMprtKrm1OZdGju4zrOvI_rk_cxJuWZ4Jc"; //ใส่ id gg doc | |
| const TEMP_FOLDER_ID = "1l0S6xUyfF_O_O7fKpoa4QHQnQFPXfYLk"; // | |
| const PDF_FOLDER_ID = "1XjszV8rPxmms6ISkmy7fAMrHjWY8dEwg"; // | |
| const IMG_FOLDER_ID = "1DmDJHohjzjAvkcxZCsOReHo99kUPuUPU" ; // | |
| const LINE_TOKEN = [""]; | |
| const SHEET_NAME = "แผ่น1";// | |
| const EMAIL_AD = "";// | |
| const IMG_COUNT ="3"; //จำนวนรูปที่บันทึก | |
| var patternData=["{วันที่สมัคร}","{ชื่อ สกุล}","{ชื่อเล่น}","{อีเมล}","{เบอร์โทรศัพท์}","{เพศ}","{อายุ}","{กรุ๊ปเลือด}","{รูปภาพที่1}","{รูปภาพที่2}","{รูปภาพที่3}"]; |
NewerOlder