I want to place 3 items in the Google tables dialog box with a choice of the answer from the text

For some reason, the dialog box currently works with only one list. The rest of the lists are ignored and do not want to appear in the specified cells. I tried to solve the problem in various ways and none helped.

Code gs

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>function openInputDialog() {
var html = HtmlService.createHtmlOutputFromFile('Index3').setSandboxMode(HtmlService.SandboxMode.IFRAME);
SpreadsheetApp.getUi()
.showModalDialog(html, 'Заполни форму');
}
function itemAdd(form) {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
sheet.appendRow([" ", form.category, form.item, form.manupub, form.details, form.quantity]);
return true;
}
</code>
<code>function openInputDialog() { var html = HtmlService.createHtmlOutputFromFile('Index3').setSandboxMode(HtmlService.SandboxMode.IFRAME); SpreadsheetApp.getUi() .showModalDialog(html, 'Заполни форму'); } function itemAdd(form) { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheets()[0]; sheet.appendRow([" ", form.category, form.item, form.manupub, form.details, form.quantity]); return true; } </code>
function openInputDialog() {
  var html = HtmlService.createHtmlOutputFromFile('Index3').setSandboxMode(HtmlService.SandboxMode.IFRAME);
  SpreadsheetApp.getUi()
       .showModalDialog(html, 'Заполни форму');
}

function itemAdd(form) {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheets()[0];
  sheet.appendRow(["  ", form.category, form.item, form.manupub, form.details, form.quantity]);
  return true;
}

HTML file

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code><!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
<form id="myForm" onsubmit="handleFormSubmit(this)">
<label for="specify the date in the format: xx.xx.xxxx">Specify the date in the format: xx.xx.xxxx</label>
<input type="text" name="category"><br><br>
<label for="the nickname of the conductor">The nickname of the conductor:</label>
<input type="text" name="item"><br><br>
<label for="choice">Сhoice:</label>
<select id="choice" name="choice">
<option value="Option1">Option1</option>
<option value="Option2">Option2</option>
</select><br><br>
<label for="choice2">Choice2:</label>
<select id="choice2" name="choice2">
<option value="Option 1">Option 1</option>
<option value="Option 2">Option 2</option>
</select><br><br>
<label for="choice3">Choice3:</label>
<select id="choice3" name="choice3">
<option value="Option 1">Option 1</option>
<option value="Option 2">Option 2</option>
</select><br><br>
<input type="button" value="Finish"
onclick="google.script.run
.withSuccessHandler(google.script.host.close)
.itemAdd(this.parentNode)" />
</form>
</body>
</html>
</code>
<code><!DOCTYPE html> <html> <head> <base target="_top"> </head> <body> <form id="myForm" onsubmit="handleFormSubmit(this)"> <label for="specify the date in the format: xx.xx.xxxx">Specify the date in the format: xx.xx.xxxx</label> <input type="text" name="category"><br><br> <label for="the nickname of the conductor">The nickname of the conductor:</label> <input type="text" name="item"><br><br> <label for="choice">Сhoice:</label> <select id="choice" name="choice"> <option value="Option1">Option1</option> <option value="Option2">Option2</option> </select><br><br> <label for="choice2">Choice2:</label> <select id="choice2" name="choice2"> <option value="Option 1">Option 1</option> <option value="Option 2">Option 2</option> </select><br><br> <label for="choice3">Choice3:</label> <select id="choice3" name="choice3"> <option value="Option 1">Option 1</option> <option value="Option 2">Option 2</option> </select><br><br> <input type="button" value="Finish" onclick="google.script.run .withSuccessHandler(google.script.host.close) .itemAdd(this.parentNode)" /> </form> </body> </html> </code>
<!DOCTYPE html>
<html>
  <head>
    <base target="_top">
  </head>
  <body>
    <form id="myForm" onsubmit="handleFormSubmit(this)">
      <label for="specify the date in the format: xx.xx.xxxx">Specify the date in the format: xx.xx.xxxx</label>
      <input type="text" name="category"><br><br>

      <label for="the nickname of the conductor">The nickname of the conductor:</label>
      <input type="text" name="item"><br><br>

      <label for="choice">Сhoice:</label>
      <select id="choice" name="choice">
        <option value="Option1">Option1</option>
        <option value="Option2">Option2</option>
      </select><br><br>

      <label for="choice2">Choice2:</label>
      <select id="choice2" name="choice2">
        <option value="Option 1">Option 1</option>
        <option value="Option 2">Option 2</option>
      </select><br><br>


      <label for="choice3">Choice3:</label>
      <select id="choice3" name="choice3">
        <option value="Option 1">Option 1</option>
        <option value="Option 2">Option 2</option>
      </select><br><br>
      

      <input type="button" value="Finish"
        onclick="google.script.run
            .withSuccessHandler(google.script.host.close)
            .itemAdd(this.parentNode)" />
    </form>
  </body>
</html>

I tried to rewrite the HTML, but it didn’t solve the problem. I have checked many forums, but I have not found a solution to this problem. I hope for your help, because there is still a lot I don’t understand in Apps script.

New contributor

Gertykio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật