I'd really like to use a form in my app, and the official Google example doesn't work.
Passing a form as a parameter to a function, prevents the function from being called.
https://developers.google.com/apps-script/guides/html/communication#forms
Look at this line in index.html
<input type="button" value="Submit"
onclick="google.script.run
.withSuccessHandler(updateUrl)
.processForm(this.parentNode)" />
See the this.parentNode
parameter? Removing it allows .processForm
to be called. In fact, replacing it with anything OTHER than a form, will also let processForm be called (albiet passing useless test strings).
I've tried many ways of passing the form as a parameter to processForm, all of them stop processForm from being called. If anyone has ever passed form data to a Google Script, let me know.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…