I have been using the FormEmailer script written by Henrique Abreu.
It is an amazing program & I am so glad to have found it.
I have one issue that has confounded me though. When I process the lines manually, it works perfectly, however, when I want to use the form submit trigger, I get an error message & it doesn’t work. This is the message:
onEdit TypeError: Cannot call method “getSheetByName” of undefined. (line 198) formSubmit
I am stumped, any help, or suggestions would be greatly appreciated!
Thanks in advance, Michael
I have been using the FormEmailer script written by Henrique Abreu. It is an
Share
How are you setting/running it for the “form submit”? From your description it seems that you’re trying to run it directly from the code editor, are you? If not, then this error message you’re getting is on your email, right?
Anyway, the correct function to run is called
timeDriven. And you should open the script editor, click the “Resources” menu and set the trigger to run it. When I wrote this version, there was no concurrency support or anyway to get the row of the form submitted. Therefore the only safe solution we had was to use the time-driven trigger, which is what I recommend you to use. But if you form has somewhat low usage, i.e. it’s unlikely that two or more users will submit data nearly simultaneously, then you can use the on form submit trigger.By the way, I’m not sure Stackoverflow is the best place to ask questions related to FormEmailer, as it is really meant only for programming doubts. Well… unless you’re modifying its code. FormEmailer related questions should be posted in its Google Group.