What is the easiest way to get some kind of toggle switch for Google HtmlService?
Google UiApp used to be able to create a simple ToggleButton like the following:
var toggleButton = app.createToggleButton('ON', 'Off').setId('MySwitch');
But UiApp has been deprecated. "Please use HtmlService instead"
I've tried
- https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_radio_value
- https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_checkbox_value
But found I cannot make them a two-stage item. Then I tried
and was able to get the HTML part working, but moving it to Google HtmlService, I cannot make it work no matter what.
Can someone give me a working Google HtmlService example that contains a two-stage item that I can use to control my output please.
https://stackoverflow.com/questions/67260048/togglebutton-for-google-htmlservice April 26, 2021 at 10:14AM
没有评论:
发表评论