首页 > 解决方案 > Password input type in google calendar add-on using apps script

问题描述

I am developing google calendar add-on using CardService, Is there any method available for adding password input box in calendar add-on using apps script.

For other google services, It can be added using HTML Service and by using SpreadsheetApp.getUi() like method, for calendar .getUi() does not seem to be available.

Does anyone have an idea about this? Thanks in advance.

标签: google-apps-scriptcalendargoogle-calendar-apigsuite-addons

解决方案


不,在Card Service类支持的方法之间,没有办法创建密码输入,最相似的方法是TextInput类。

解决方法 1:

使用TextButton在另一个窗口中打开一个链接,在该窗口中您可以使用输入密码的应用程序(例如,指向Web App的链接)。

解决方法 2:

使用 TextInput 中的 onChangeAction 来操作文本输入中的值并将卡片元素再次返回给用户(如本答案中所述)。这将涉及必须存储来自文本输入的更新值,例如使用属性服务,并将文本输入的值更改为用户键入的相同数量的字符,但将字符替换为“*”。


推荐阅读