Tuesday, 15 March 2011

onOpen trigger not being activated on Google Form -



onOpen trigger not being activated on Google Form -

the onopen event on google form beingness activated when open form edition, not when open reply (/viewform). actually, want run when opens form answer, because script updates combobox current info table. i'm not sure if best way it, i'm open suggestions. tried both creating funcion onopen() , creating doit() function , manually adding trigger onopen on resources > add together trigger menu. trigger listed correctly , seems working opening form edition updates properly. got wrong trigger handler then, there no others want (just onedit, should onopen doing, , oninstall). docs incredibly succinct, , absolutely focused on spreadsheets scripts. mention custom hooks, however, called installable triggers, , 1 of them actually:

when spreadsheet or form editor opened. (note trigger not activate when user opens form respond, rather when editor opens form modify it.) unlike simple trigger onopen, installable trigger can deed user installed trigger.

which suggests onopen should want... confused.

also, i'm not sure how permissions work. now, far can see, seems whom share form able edit it, , can reply it, long person has url. there way whitelist people reply it? don't quite url beingness barrier stopping outsiders see info i'm loading combobox, and, important, update info submitting form... seems brute-force unravel lot of 'secret' forms way... or ok, security standpoint, , mad?

the trigger need install not onopen onformsubmit. shows in script editor/ressources/current script trigger

see illustration below

as have read (but aparently not understood), onopen trigger fires when opens form editor, not when fills in (submits) form.

about sec point, there no way whitelist users allowed fill form, can select answers based on used names , reject answers don't allow.

if access command vital you accomplish quite efficient using uiapp or html service bit more complex.

concerning lastly point permissions, things simple : installable triggers run user created trigger. if did script run if ran manually, using priviledges , access rights.

google-apps-script google-form

No comments:

Post a Comment