JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Google Spreadsheet: Integrated spreadsheet is not triggering custom script upon submission.Asked by assafaman on October 06, 2016 at 04:49 PM
I have integrated my form with a google spreadsheet. the problem is this:
I have some scripts running on the spreadsheet - all kinds of statistics, preventing multiple registration etc.
the scripts need to be triggered. usually I trigger them upon form submit. when I realized that the trigger is not sensing the form submit, probably because the form is external to Drive, I have tried triggering on sheet change. Unfortunately, this doesn't work also.
its important to say that I have the exact same scripts running OK with internal google forms. also when I run the script manually after form submission, it works fine. the only problem is with the triggering.
Hope you can think of a solution because without the capability to run statistics the form is useless for me
I found some samples in the Google documentation that I have applied to a integrated with JotForm spreadsheet, here is the link to the documentation that I found: https://developers.google.com/apps-script/guides/triggers/
I have applied the onEdit() function to a spreadsheet and I can see it works when an information is manually edited or when the spreadsheet is manually opened, but changes upon form submission do not seem to trigger the script.
Here is how I have set up the script shown in the Google documentation:
I'm not sure if this has to do in how the Google API works since when a record is updated in the form it is also updated in the spreadsheet, but it does not seem to be updating the last edited or last opened date.
I will forward this thread to our second level so our developers may take a look into this, we will update you via this thread as soon as we get updates.
Maybe its because the Jot form is integrating directly with the spreadsheet so the OnFormSubmit trigger is not aware of that? or is it that you are interfacing the sheet the same way a google form would do?
I will wait for further updates
This issue has been already forwarded to the second level. When they come to you with a solution, you will be notified under this thread.
In the meantime, If you have more any other questions, please feel free to open a new thread.